ruby on rails - formstatic belongs to and active admin -


i have problem active admin when try add new user role shows object id instead of string

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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -