hey, i want a list of daysnumber 1 through 31, and a value must be selected, the
one from the database
the purpose is that a date is retrieved from the database, broken up in 3
selects (year, month , day), and select the value from the database
in my controller i create the day list
@day = @start_time_local.strftime(''%d'') # this date is from
the database,
filtered out the day
@days = []
1.upto(31) do |d|
@days.push( { d => d})
end
in my rhtml i want the list of days, and the selected value must be @day
<select name="time_entry[start_day]">
<% options_for_select( @days, @day ) %>
</select>
thanks in advance