开发者

Help with rails collection select

I need to add differe开发者_JAVA百科nt values for each option tag in my collection_select cause Im trying to use this jquery plugin.... How do I do that?

Heres my collection select code

<%= e.collection_select(:id,State.all,:id,:name) %>

The output should be something like

<select name="state[id]" id="state_id" class="selectable">
<option value="">-- select --</option>
<option value="1" title="florida">Florida</option>
<option value="2" title="georgia">Georgia</option>
</select>

Please help.


Hmm, I believe you gotta write your own helper to do so.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜