ruby on rails - Using rails_admin to display dropdown list on belongs_to association -
i using rails_admin manage data in rails application.
i have class:
class activity < activerecord::base attr_accessible :content, :title, :category_id belongs_to :category, :inverse_of => :activities end and other end is:
class category < activerecord::base attr_accessible :title, :category_id, :activities_ids has_many :activities, :inverse_of => :category end my rails_admin initialiser activity looks this:
config.model activity edit field :title field :content, :text bootstrap_wysihtml5 true end field :category end end now, in form renders category this:

it supposed render names of categories, right? missing here?
i've been looking quite while. nice autocomplete dropdown add:
config.model activity edit field :category, :belongs_to_association end end
Comments
Post a Comment