I was working on a new Rails 4 app (on Ruby 2.0.0-p0) when I ran into some authenticity token problems. While writing a controller that responds to json (using...
There’s a strange issue with Rails 4 on Heroku. When images are compiled they have hashes added to them, yet the reference to those files from within CSS don’t...
I’m getting this error when I try to upload using paperclip with my rails blogging app. Not sure what it is referring to when it says “MissingRequiredValidatorError” I thought...
I use the following line in an initializer to autoload code in my /lib directory during development: config/initializers/custom.rb: RELOAD_LIBS = Dir[Rails.root + 'lib/**/*.rb'] if Rails.env.development? (from Rails 3 Quicktip:...
attr_accessible seems to no longer work within my model. What is the way to allow mass assignment in Rails 4? 6 Answers 6
A user has many uploads. I want to add a column to the uploads table that references the user. What should the migration look like? Here is what I...
In rails >4.0.0 generators creates CRUD operations with before_action not before_filter. It seems to do the same thing. So what’s the difference between these two? 6 Answers 6
I just updated to rails 4.0.2 and I’m getting this warning:...
Is there an alternative to update_attributes that does not save the record? So I could do something like: @car = Car.new(:make => 'GMC') #other processing @car.update_attributes(:model => 'Sierra', :year...
I ran into an issue in my Rails 4 app while trying to organize JS files “the rails way”. They were previously scattered across different views. I organized them...