Forum: Ruby on Rails options_for_select helper is also mess....

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kad K. (Guest)
on 2007-05-10 11:11
I am 'trying' to use 'options_for_select'

<select name="selected_distance" id="selected_distance"
<%= options_for_select(["2", "5", "10", "15", "25" ], @selected_distance
) %>

which generates the html....

<select name="selected_distance" id="selected_distance"
<option value="2">2</option>
<option value="5">5</option>
<option value="10" selected="selected">10</option>
<option value="15">15</option>
<option value="25">25</option>

but the dropdown selection is NOT selected,  first item always......
what's wrong ?

(OS X , Firefox)
This topic is locked and can not be replied to.