在rails 5中,删除了attr_accessible。那么如何使用has_one关联。 就像我一样:
class Setter
include Mongoid::Document
include Mongoid::Timestamps::Created::Short
has_one :user
end
和
class user
include Mongoid::Document
include Mongoid::Timestamps::Created::Short
belongs_to :setter
end