Flowdock

Notes posted by neilos

RSS feed
October 1, 2014
0 thanks

Preselecting options

To preselect options, pass in the selected options in the options hash:

{ :selected => [ selected_option_1, selected__option_2, ... ] }

Code example

grouped_collection_select(:city, :country_id, @continents, :countries, :name, :id, :name, { :selected => [1, 5, 6 ] } )