Ruby on Rails is an open-source web development framework written in Ruby. Ruby on Rails follows the principle of convention over configuration, freeing you from having to re-invent things to stay productive. Ruby on Rails 4.0 is the latest edge version available.

learn more… | top users | synonyms

0
votes
0answers
15 views

rails getting value from view to conroller

Having an issue getting a value from a form to the controller. I am using rails 4.0. My view looks like this (new.html.erb) <h1> POST A NEW LISTING </h> <% if current_user.nil? ...
0
votes
2answers
12 views

rails form_for nested data doesnt show up

New to rails and getting confused on how to handle this. I am using rails 4. I am very stuck here and will try to talk through this problem. I have a listings page which I am trying to add tags too. ...
0
votes
1answer
12 views

How to make an optional strong parameters key yet still filter params nested in it?

I have this in my controller: params.require(:item).permit! Let's assume this rspec spec: put :update, id: @item.id, item: { name: "new name" } It works as expected, no error. However, if I use ...
0
votes
1answer
14 views

Deletion of nested attributes does not work

I seem to be unable to delete items using the accepts_nested_attributes_for command but I have done this according to this tutorial and the associated git repo. My models are ... class Job < ...
0
votes
1answer
17 views

Does Rails 4 no longer compile fingerprintless assets?

I've been struggling with this for hours. It seems like rails 4 no longer includes assets without the md5 hash in the name. This is breaking features like webfont css that requires .eot, .svg, .ttf ...
0
votes
1answer
9 views

unable to push application to heroku

This is the error i get when i try to push git to heroku. I have just created a very simple scaffolding and added some javascript to it. It is just a small hello world program. For jquery and jquery ...
0
votes
0answers
5 views

Modifying a user record logs them out in Rails

I have a basic log in / sessions controller, based on Rails Tutorial. I noticed that whenever a User's record is edited in any way, it will log them out and make them log in again. If this is the ...
0
votes
0answers
9 views

Heroku not loading Google fonts

I'm running a site on Heroku, and having some troubles getting a google font to load. My typography.sass file contains this: @import url(http://fonts.googleapis.com/css?family=Bitter) h1 ...
0
votes
1answer
10 views

How to use lambda for a scope syntax

I'm using the following scope in a Rails 3.2 application: scope :consumable, lambda { where('expiration_date > ?', Date.today) } What is the correct syntax to achieve the same in Rails 4 with ...
0
votes
0answers
26 views

How redirect subdomains to multiple controllers on Rails 4?

I have Agent and Brand in my Rails 4 app (an Agent has many :brands), and each one have a :subdomain field. So I want to have: - agentsubdomain.domain.com (should redirect to 'agents#show') - ...
0
votes
2answers
24 views

Rails helper method is working where it is not supposed to work?

Inside my helper/posts_helper.rb file, I'm defining a method such like this: module PostsHelper def testing(test) "Yep its a #{test}" end end I assume that this testing helper ...
1
vote
1answer
18 views

how to permit one of the parameters to be arbitrary hash using strong_parameters?

I have a model with one of the fields being serialise :config, JSON. it should permit any hash as a value. But I can't quite see a clean way to do it with strong_parameters. my current solution is: ...
-1
votes
2answers
34 views

In Rails 4 I want to create a movie and then change the permissions

For example, create a little movie reviews app like IMDB. I am assuming it is something like this # app/models/User.rb class User < ActiveRecord::Base has_many :reviews has_many :movies, ...
0
votes
1answer
29 views

Rails 4 & Devise - User's name is not added to database when new user created

I'm new to the Ruby on Rails environment and most problems I've been able to solve, but I haven't been able to find a solution to this problem yet. To provide context: Using rails (4.0.0) Using ...
0
votes
1answer
8 views

How to make image_tag hyperlink using link_to in Rails, with mouseover?

I am placing *image_tag* images within *link_to* elements, as well as trying to do a mouseover image swap. It's all working except for the mouseover, which is not grabbing the alternate image. On a ...

1 2 3 4 5 39
15 30 50 per page