Rails 3 has_many changed?
问题 I need to track changes (additions and deletes) of an association set up like this: has_many :listing_services has_many :services, through: :listing_services For normal attributes the easist way to do it is to check l.changes[attribute] in before_save or l.previous_changes[attribute] in after_save . The question is, what is the best way to do it for has_many attributes? 回答1: I didn't use changes method. But I'm sure that you always can use magic methods <attribute_name>_changed? and