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:

missing field

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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -