Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

learn more… | top users | synonyms (2) | ruby on rails jobs

0
votes
0answers
12 views

Threadsafety of Ruby variables?

This is a very basic concurrency question. In Ruby, is it safe to assume that any state stored in a local variable is threadsafe? Specifically, I'm thinking of a request in a Rails app. If I were to ...
-1
votes
0answers
11 views

How to add associations to module?

How to achive this sturcture in Rails? User has_one :health Health belongs_to :user has_many :weights has_many :diseases Health::Weight belongs_to :health Health::Diseases belongs_to :health ...
0
votes
0answers
5 views

Real time application with Brunch, Node.js, Socket.io, MySQL, Rails and Ember.js

I'm trying to use Brunch with Rails and Ember.js with Separation of Frontend and Backend then use Node.js and Socket.io for real time updates. I think this tutorial Adding Real-Time to Rails With ...
1
vote
1answer
9 views

Load Google Maps script only on certain pages in Rails app

I have a Rails application that consists of about 20 pages and only on two of those I'm using Google Maps. Is there any better way to exclusively load the Google Maps API-script on certain pages ...
0
votes
0answers
8 views

Why does CORS apply on localhost when using 'lvh.me'?

I was having an issue with CORS in my Rails App and my JS front-end app, before I used rack-cors (https://github.com/cyu/rack-cors). The JS front-end app will be a subdomain of my Rails app. So I ...
1
vote
1answer
17 views

using simple_form with bootstrap 3

Does anyone know how to change the class simple_form uses from 'controls' to 'form-control'. This was a change made in Bootstrap 3. I know there are many options in config/initializers/simple_form.rb ...
2
votes
2answers
15 views

Exclusive join on has many relationship

I have a Postgres table where user can have many payment subscriptions and the payment subscriptions are either active or inactive, which is shown through an activated_at and an inactivated_at date ...
0
votes
0answers
5 views

Cucumber only showing Capybara errors when there's an error in a Controller

I keep having an annoying issue with Cucumber. If there are any errors in the Controller, it only shows the errors raised by capybara. I'm sure that's not the way it used to work? For example, if an ...
0
votes
0answers
13 views

Rails Tutorial add test for user signing out but fails

I'm going through Michael Hartl's Rails tutorial. I downloaded the source code samle_app_rails_4. Then I add a test for signing out a user, it works fine in my browser, but in Rspec, it fails. I ...
0
votes
1answer
22 views

convert “denormalised” hash

I am working with a file that has "denormalised" keys in it, and have read it into a hash. The hash looks like this in part: :primer_left_0_sequence=>"TCCTTCCTGCAGCCATGAAG", ...
0
votes
1answer
29 views

rails regular expression validation string escape

I have a name attribute in my model which is validated by validates :name ,format:{with: /^[\p{L} \.'\-]+$/ , message: "invalid name" } The following syntax error was found while creating an ...
0
votes
0answers
6 views

How to exclude assets path from localization in rails

I have a problem with loading files from public directory when I change localization of my app. Example: location of template: `public\templates\template.html this works ...
0
votes
1answer
21 views

Ruby on Rails accessing MySQL results error

In my view I send an ajax request to get the device_ports of a particular device. Previously I used def get_device_ports if params[:id] != '' @device_ports = ...
0
votes
1answer
16 views

Errors raised twice in when inherited model object validation fails

Subclass validations as well as superclass validations implemented. How to discard superclass validations in subclass? My code: class a < ActiveRecord::Base validates_presence_of :price end ...
0
votes
2answers
15 views

How to solve this tagging system routing issue

I have a tag resource in routes.rb: resources :tags as well as a tag link code snippet: get 'tags/:tag', to: 'users#index', as: :tag. The tag link code snippet allows me to click on a tag link and be ...

1 2 3 4 5 8486
15 30 50 per page