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:...
  • May 25, 2022
  • 0 Comments
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
  • May 11, 2022
  • 0 Comments
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...
  • May 8, 2022
  • 0 Comments