after_destroy callback order in Rails
问题 I am using PostgreSql as database and Rails 3.1.3 and ruby 1.9.3 I have 3 models. Activity ActivityObject ActivityObjectActivity They are related this way. Activity has_many :activity_object_activities,:dependent => :destroy has_many :activity_objects, :through => :activity_object_activities after_destroy :do_something_on_activity_object_related ActivityObject has_many :activity_object_activities, :dependent => :destroy has_many :activities, :through => :activity_object_activities