Skip to content

Instantly share code, notes, and snippets.

@bayendor
Created November 9, 2013 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayendor/7385660 to your computer and use it in GitHub Desktop.
Save bayendor/7385660 to your computer and use it in GitHub Desktop.
Ransack multiple selects
f.collection_select :some_id_in, Model.all, :id, :name, {}, {:multiple => true}
# I have to do the following to get the select field I want:
search_form_for @search do |f|
f.collection_select :level_in, Log.levels, :to_s, :to_s, {}, { size: Log.levels.length, multiple: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment