我想为选择框使用jQuery验证插件,但我不知道如何在select中添加value =“”。这是我的代码:
<%= f.select :language, options_for_select([
"--- please select ---",
"Arabic",
"Chinese"
])
%>
我想添加
value="" option="please select"
我如何在Rails中完成它?
答案 0 :(得分:1)
<%= f.select :language, options_for_select([
"Arabic",
"Chinese"
], {:prompt => "please select"})
%>