Top "Ruby-on-rails-4" questions

For issues specific to version 4 of Rails.

Rails 4: assets not loading in production

I'm trying to put my app into production and image and css asset paths aren't working. Here's what I'm currently …

ruby-on-rails ruby asset-pipeline ruby-on-rails-4
Determine what attributes were changed in Rails after_save callback?

I'm setting up an after_save callback in my model observer to send a notification only if the model's published …

ruby-on-rails ruby-on-rails-4 model callback observer-pattern
Rails 4 - Strong Parameters - Nested Objects

I've got a pretty simple question. But haven't found a solution so far. So here's the JSON string I send …

ruby-on-rails ruby-on-rails-4 nested-attributes strong-parameters
Why am I asked to run 'rake db:migrate RAILS_ENV=test'?

On Rails 4.0.0.rc1, Ruby 2.0.0, after I run a migration, I see the following error when I try to run a …

ruby-on-rails rails-migrations ruby-on-rails-4
LEFT OUTER JOIN in Rails 4

I have 3 models: class Student < ActiveRecord::Base has_many :student_enrollments, dependent: :destroy has_many :courses, through: :student_enrollments …

sql ruby-on-rails ruby-on-rails-4 rails-activerecord mysql2
scopes with lambda and arguments in Rails 4 style?

I'm wondering how the following is done in Rails 4 or if I just use the Rails 3 approach for using a …

ruby-on-rails-4 scope rails-activerecord
ActionController::InvalidAuthenticityToken in RegistrationsController#create

Hi I am using Devise for my user authentication suddenly my new user registration was not working. this was error …

ruby-on-rails devise ruby-on-rails-4
Rails: respond_to JSON and HTML

I have a controller "UserController" that should respond to normal and ajax requests to http://localhost:3000/user/3. When it is …

ruby-on-rails ruby ruby-on-rails-4 respond-to
What is `params.require(:person).permit(:name, :age)` doing in Rails 4?

All the examples of strong parameters in Rails 4 docs use params.require(:person).permit(:name, :age) Could someone please deconstruct …

ruby-on-rails-4