Hey,Guys! Now I hava a problem,how can I make the callback#after_add receive a reference to the join model in a has_many :through association? my code like this:
class Emergency
has_many :departments, :through => :eme_references, :after_add => Proc.new { |eme_reference| eme_reference.eme_flag = 1}
end
the attribute eme_flag is the model EmeReference's attribute! but in the block ,i get the eme_reference.class is Emergency. I want to set the attribute eme_flag of the model EmeReference. That is my question! cheers!