search for: selected_order_hours

Displaying 1 result from an estimated 1 matches for "selected_order_hours".

2007 May 11
5
options_for_select - how to set the selected value?
...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_hours) @selected_order_hours is being set in the controller when the form is posted. It comes back as either 1, 24, 168, 336 and is definitely being set as confirmed through logging and printing from the view. However, the selected valued is never set! I have tried all combinations of :selected, selec...