Rails_admin with has_one issue in rails 5

350 views Asked by At

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. enter image description here

1

There are 1 answers

3
Rooby Doo On

No need to set attr_accessible in the model anymore.

Rather use strong params.