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 [b82fab25f999dd6245c23a22f948048eef2d5d9a] by Jon Leighton

Revision b82fab25f999dd6245c23a22f948048eef2d5d9a, committed by Jon Leighton · October 30th, 2010 @ 02:30 PM

Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
http://github.com/rails/rails/commit/b82fab25f999dd6245c23a22f94804...

11 changed files

  • M activerecord/lib/active_record/associations/association_collection.rb
  • M activerecord/lib/active_record/associations/association_proxy.rb
  • M activerecord/lib/active_record/associations/belongs_to_association.rb
  • M activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
  • M activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  • M activerecord/lib/active_record/associations/has_many_association.rb
  • M activerecord/lib/active_record/associations/has_many_through_association.rb
  • M activerecord/lib/active_record/associations/has_one_association.rb
  • M activerecord/lib/active_record/associations/has_one_through_association.rb
  • M activerecord/lib/active_record/associations/through_association_scope.rb
  • M activerecord/lib/active_record/autosave_association.rb