Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [65469a6e5e8cd2418c99c3862dd33feed69536bd] by Jon Leighton

Revision 65469a6e5e8cd2418c99c3862dd33feed69536bd, committed by Jon Leighton · April 15th, 2011 @ 01:27 PM

Return nil from read_attribute(:foo) if 'foo' is not present in the @attributes hash, but the _foo method has been defined. This brings the behaviour into line with the 3-0-stable branch and the master branch before 93641ed6c8c684f6b4db02b6c8a22fa9bc7f0eaf (there were previously no assertions about this which is why the change slipped through). Note that actually calling the 'foo' method will still raise an error if the attribute is not present.
https://github.com/rails/rails/commit/65469a6e5e8cd2418c99c3862dd33...

2 changed files

  • M activerecord/lib/active_record/attribute_methods/read.rb
  • M activerecord/test/cases/finder_test.rb