在使用 :through 选项时,显然依赖 => destroy 会被忽略。
所以我有这个...
class Comment < ActiveRecord::Base
has_many :comment_users, :dependent => :destroy
has_many :users, :through => :comment_users
...
end
...但删除评论不会导致关联的 comment_user 记录被删除。
那么,对于使用 :through 时的级联删除,推荐的方法是什么?
谢谢