class Post < ActiveRecord::Base
has_many :comments, dependent: :destroy
before_destroy :post_method1
after_destroy :post_method2
end
class Comment < ActiveRecord::Base
belongs_to :post
after_destroy :comment_method
end
在post.destroy
之后(if post.comments.any? = true)
之后,如何在两个模型中对回调和销毁方法进行排序?