Help with rails collection select

Posted by NachoF on Stack Overflow See other posts from Stack Overflow or by NachoF
Published on 2009-12-15T22:31:50Z Indexed on 2010/04/02 10:03 UTC
Read the original article Hit count: 408

Filed under:
|
|

I need to add different 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.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about forms