the list still displays the first option (No Contract) in the list.
What am I doing wrong? I've looked all over and it looks like this
should be working.
I've tried using "to_i", but it still generates the wrong "selected"
value.
<%= select_tag(fruit.id, "<option>No Contract</option>" +
options_from_collection_for_select(@fruit_types, "id", "kind",
fruit.kind_id.to_i)) %>
generates
<select id="70" name="70"><option>No Contract</option><option value="3"
selected="selected">40 bucks for a PR 10 Links</option>
<option value="7">Antidisestablishmentarialism</option></select>
the list still displays the first option (No Contract) in the list.
What am I doing wrong? I've looked all over and it looks like this
should be working.
I've tried using "to_i", but it still generates the wrong "selected"
value.
<%= select_tag(fruit.id, "<option>No Contract</option>" +
options_from_collection_for_select(@fruit_types, "id", "kind",
fruit.kind_id.to_i)) %>
generates
<select id="70" name="70"><option>No Contract</option><option
value="3"
selected="selected">40 bucks for a PR 10 Links</option>
<option value="7">Antidisestablishmentarialism</option></select>