Hi
let''s say I''ve the following associations
class User < ActiveRecord::Base
has_many :user_network_privacies, :dependent => :destroy
has_many :networks, :through => :user_network_privacies
end
class UserNetworkPrivacy < ActiveRecord::Base
belongs_to :user
belongs_to :network
before_destroy { puts "my before_destroy callback" }
end
I would expect the before_destroy to be called when I do
a_user.networks.delete(a_network) wich is true in rails 1.2.3 (my
actual version) but not in rails 1.2.6 (my target version).
If anybody has some explanations, the only thing related I see in
active record changelog is on version 1.15.6
* Fix has_many :through delete with custom foreign keys. #6466
[naffis]
Thanks in advance
Niko
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---