This project is archived and is in readonly mode.
Associations bug with :dependent => [:delete or :destroy]
Reported by Carlos Antonio da Silva | March 7th, 2010 @ 11:01 PM | in 3.0.2
It seems last commits refactoring associations introduced a small bug where associations with :dependent => :delete or :destroy were calling association.destroy only, and not association.delete. Here are the two commits:
http://github.com/rails/rails/commit/939291e8f2b68e11cde12f5f08886f...
http://github.com/rails/rails/commit/a424f199a9143e7ea451ba6f5e7dc5...
Attached is a patch using :send to call the right :destroy or :delete method.
Comments and changes to this ticket
-
Carlos Antonio da Silva March 8th, 2010 @ 12:58 AM
Just noticed the tests were passing both before and after the patch, so here is another patch with new tests and a test fixed.
-
José Valim March 8th, 2010 @ 10:55 PM
- State changed from new to resolved
- Milestone cleared.
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
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>