[Rails-core] has_many :dependent => :destroy and association callbacks

2010-12-28 Thread Robert Pankowecki
Today I noticed that calling object.collection.destroy_all leads to calling association callbacks like ex. :before_remove but object.destroy does not call those callbacks when configured with :dependent => :destroy option. You can find that hbtm uses collection.clear which under the hoods calls co

Re: [Rails-core] has_many :dependent => :destroy and association callbacks

2010-12-30 Thread Jon Leighton
Hiya, I am working on refactoring this section of the code at the moment actually, and this problem will be fixed when I'm done. Cheers On Tue, 2010-12-28 at 08:27 -0800, Robert Pankowecki wrote: > Today I noticed that calling object.collection.destroy_all leads to > calling association callback

Re: [Rails-core] has_many :dependent => :destroy and association callbacks

2010-12-30 Thread Robert Pankowecki
I'm glad to hear it. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@go