Tag Archives: TableLayout and AbsoulteLayout

rails input selected values from params to select_tag (multiple => true)

I want to keep the select_tag(:multiple => true) options to be selected which were selected by user once search is performed

Suppose a user select 4 values from the select tag then for values should be selected,
How can we pass this 4 values to the select_tag?

I tried using :selected => params['values[]'] yet this doesnt works for multiple true

Any assist will be appreciated

Ref this & options_for_select

Something like following