rails/rails — pull request #9672 by stream7 (2013-03-11 22:37:09+00:00)
Title: collection_association#delete_all should ignore dependent option (Fixes #9567)

This is a fix for issue #9567
I think that the dependent options should be taken into account only when destroy is called on the "parent" of the has_many association. In the issue's example it is the post. When delete_all is called directly on the association it should ignore the dependent option completely but should call the before_add/before_remove callbacks since all existing records will be removed from the collection.

This is not the current behaviour and this change could break some existing apps. This PR might needs some additional tests but I wanted to see if you would agree on this first.