Scott Tamosunas's blog



Scott TamosunasScott Tamosunas
Standup 2/9/09 - chaining associatons, use_rails_error_handling! and eager_load_paths
edit Posted by Scott Tamosunas on Monday February 09, 2009 at 05:29PM

Interesting things

  • People seem to think it would be useful to chain associations in the same way that named scopes work. E.g., post.comments.authors. We might look at providing a patch to do so.

  • Rspec and Rails 2.2 modifies rails to not rescue exceptions as it normally does. To fix that, add the following to your tests:

describe ThingsController do
   before(:each) do
     controller.use_rails_error_handling!
   end
end
  • A project was running into a problem on non dev/test environments with rails 2.2 where if we did a db:drop and a subsequent db:create, the migrations were blowing up with an exception on the Rails::Initializer.run line in environment.rb. The models were being loaded before any of the migrations had run, thus failing because the tables didn't exist. To work around this, add config.eager_load_paths = [] in your Rails::Initializer. It was suggested this was either a bug in 2.2.2 and/or a bad interaction with desert.

Scott TamosunasScott Tamosunas
Standup 11/6/2008
edit Posted by Scott Tamosunas on Thursday November 06, 2008 at 05:13PM

Ask for Help

"console.log seems to be broken again in Firebug with 1.2.1?"

People have had some success with 1.3 beta. Get Firebug

"Suggestions for creating PDF's in Ruby?"