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