ruby - Prompt option is not working in Edit view in Active Admin in Rails -



ruby - Prompt option is not working in Edit view in Active Admin in Rails -

i have 2 select boxes.

in 1 select box in edit mode, prompt showing 'select certification provider'. in select box in edit mode, prompt not showing 'select certification'.

f.input :certificate_provider ,as: :select ,:collection => certificateprovider.select('id,name').map{|c| [c.name,c.id]} , :prompt => "select certification provider" f.input :certification ,as: :select ,:collection => certification.select('id,name').map{|c| [c.name,c.id]} , :prompt => "select certification"

i don't know why showing prompt in 1 select box , not in sec 1 in edit mode.

is there left do?

thank you.

use :include_blank instead of :prompt

:include_blank => "select certification"

modify code as:

f.input :certification ,as: :select ,:collection => certification.select('id,name').map{|c| [c.name,c.id]} , :include_blank => "select certification"

this work in both new , edit.

ruby-on-rails ruby ruby-on-rails-3 activeadmin

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -