Skip to content

Instantly share code, notes, and snippets.

@AlexanderRD
Created September 10, 2015 09:12
Show Gist options
  • Save AlexanderRD/9ab57fe80cf0c866b1aa to your computer and use it in GitHub Desktop.
Save AlexanderRD/9ab57fe80cf0c866b1aa to your computer and use it in GitHub Desktop.
Rails chosen select example
$(function() {
$('.chosen-select').chosen({
allow_single_deselect: true,
no_results_text: 'No results matched'
});
});
= simple_form_for @nato, url: { action: action } do |f|
= f.input :member_countries, as: :country, input_html: { class: 'chosen-select', multiple: true }
@AlexanderRD
Copy link
Author

Select for choosing multiple countries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment