Rails 3: f.select - options_for_select

后端 未结 6 1414
你的背包
你的背包 2021-01-31 16:47

I have a form on my Ruby on Rails3 Application with a drop menu, this is my current code for the select option:

<%= f.select :phone_type, options_for_select([         


        
6条回答
  •  梦如初夏
    2021-01-31 16:53

    could be <%= f.select :phone_type, options_for_select(["Cell", "Work", "Office", "Home", "Other"]), :prompt => "Select One", :class => 'genForm_dropBox' %>

提交回复
热议问题