Top "Ruby-on-rails-4" questions

For issues specific to version 4 of Rails.

Rails 4: before_filter vs. before_action

In rails >4.0.0 generators creates CRUD operations with before_action not before_filter. It seems to do the same thing. …

ruby-on-rails ruby ruby-on-rails-4 crud
Nested attributes unpermitted parameters

I have a Bill object, which has many Due objects. The Due object also belongs to a Person. I want …

ruby-on-rails ruby-on-rails-4
Rails: NameError: uninitialized constant

I have a simple model called PhoneNumber: class PhoneNumber < ActiveRecord::Base validates :pnumber, presence: true, on: :create #=> { :message =&…

ruby-on-rails ruby-on-rails-4 rails-console
How is attr_accessible used in Rails 4?

attr_accessible seems to no longer work within my model. What is the way to allow mass assignment in Rails 4?

ruby-on-rails ruby-on-rails-4
Rails update_attributes without save?

Is there an alternative to update_attributes that does not save the record? So I could do something like: @car = …

ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4 rails-activerecord
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

Before anything, please note that I have found several similar questions on Stack Overflow and articles all over the web, …

ruby-on-rails ruby postgresql ruby-on-rails-3 ruby-on-rails-4
Rails 4 image-path, image-url and asset-url no longer work in SCSS files

Are we supposed to use something else aside from image-url and others in Rails 4? They return different values that don't …

ruby-on-rails asset-pipeline ruby-on-rails-4
ActionController::UnknownFormat

In my rails app I have a ajax request to the server, to store some data. This used to work …

ruby ajax ruby-on-rails-4 respond-to
Rails 4 Authenticity Token

I was working on a new Rails 4 app (on Ruby 2.0.0-p0) when I ran into some authenticity token problems. While …

ruby-on-rails ruby ruby-on-rails-4 authenticity-token
Auto-loading lib files in Rails 4

I use the following line in an initializer to autoload code in my /lib directory during development: config/initializers/custom.…

ruby-on-rails ruby-on-rails-4