This project is archived and is in readonly mode.

Changeset [0e92f67073079fe3d34acd141099cdad28b0ee00] by Ben VandenBos

January 16th, 2009 @ 05:23 PM

Make belongs_to :dependent => :destroy destroy self before associated object [#1079 state:resolved]

If foreign key constraints are in place then deleteing the associated object first will cause a foreign key violation

Signed-off-by: Frederick Cheung frederick.cheung@gmail.com http://github.com/rails/rails/co...

Committed by Ben VandenBos

  • M activerecord/lib/active_record/associations.rb
  • M activerecord/test/cases/associations/has_many_associations_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>