ruby on rails - active_admin and has_one association -
i have 2 models following associations:
class panel < activerecord::base belongs_to :survey end class survey < activerecord::base has_one :panel end and i'm using active_admin manage surveys:
activeadmin.register survey config.per_page = 20 actions :index, :edit, :update index column 'survey id' |s| s.id actions defaults: true end form |f| inputs input :id, input_html: { disabled: true } end f.actions end end and want add field form have possibility change survey panel. read through documentation of active_admin didn't find similar case... possible activeadmin?
you can create forms nested models using has_many method, if model uses has_one
Comments
Post a Comment