标签: ruby-on-rails-4 mongoid
删除用户后,计划将被删除。
我错过了什么吗?
它应该删除属于已删除用户的所有计划。
class User include Mongoid::Enum include Mongoid::Document has_many :plans, dependent: :destroy class Plan include Mongoid::Document belongs_to :user