Prompt in select_tag

后端 未结 4 696
醉话见心
醉话见心 2021-02-07 07:31

In my application in user registration I have a country picker..

<%= select(:user, :country, options_for_select(@COUNTRIES)) %>

And I wan

4条回答
  •  自闭症患者
    2021-02-07 08:26

    You can also give customized prompt value like this

    select(:user, :country, options_for_select(@COUNTRIES), :prompt=>"select User name")
    

提交回复
热议问题