In rails 5, attr_accessible is removed. So how to use has_one association. Like I have:
class Setter
include Mongoid::Document
include Mongoid::Timestamps::Created::Short
has_one :user
end
and
class user
include Mongoid::Document
include Mongoid::Timestamps::Created::Short
belongs_to :setter
end
Right now I am getting no dropdown box for user field in new setter in rails_admin form.
No need to set
attr_accessible
in the model anymore.Rather use strong params.