ruby on rails - formstatic belongs to and active admin -
i have problem active admin when try add new user
i have in roles table admin , instructor how make display them user.rb file in admin directory
activeadmin.register user form |f| f.inputs "new user" f.inputs :f_name f.inputs :l_name f.inputs :age f.inputs :job_title f.inputs :slug f.inputs :birthdate f.inputs :country f.inputs :role f.semantic_fields_for :images |fi| fi.input :photo, :as => :file end end f.button :submit end end
can me ?
you can following:
f.inputs :role, :as => :select, :collection => # write here code produce `id`s saved in database, , string shown on web page.
Comments
Post a Comment