I want to keep the select_tag(:multiple => true)
options to be selected which were selected by user once search is performed
<%= select_tag 'values[]', method_for_options_for_select, :class => 'some-class', :multiple => true, :size => 6 %>
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[]']
but this doesnt works for multiple true
Any help will be appreciated