Displaying 1 result from an estimated 1 matches for "filter_hour".
Did you mean:
filter_hours
2007 May 11
5
options_for_select - how to set the selected value?
Ok, this should be simple but I am finding it''s not and previous
postings don''t seem to shed too much light on this.
I have a select_tag with 4 values pulled in via a helper:
def filter_hours
filter_hours = [
["1 hour", 1],
["24 hours", 24],
["7 days", 168],
["14 days", 336],
]
end
The select_tag looks like the following:
select_tag :order_hours, options_for_select(filter_hours, :selected =>
@selected_order_...