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

Revision 05bcb8cecc8573f28ad080839233b4bb9ace07be, committed by Jon Leighton · February 7th, 2011 @ 11:35 PM

Support the :dependent option on has_many :through associations. For historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
https://github.com/rails/rails/commit/05bcb8cecc8573f28ad080839233b...

8 changed files

  • M activerecord/CHANGELOG
  • M activerecord/lib/active_record/associations.rb
  • M activerecord/lib/active_record/associations/has_many_through_association.rb
  • M activerecord/lib/active_record/associations/through_association.rb
  • M activerecord/test/cases/associations/has_many_through_associations_test.rb
  • M activerecord/test/models/person.rb
  • M activerecord/test/models/reference.rb
  • M activerecord/test/schema/schema.rb