Created
September 10, 2015 09:12
-
-
Save AlexanderRD/9ab57fe80cf0c866b1aa to your computer and use it in GitHub Desktop.
Rails chosen select example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('.chosen-select').chosen({ | |
allow_single_deselect: true, | |
no_results_text: 'No results matched' | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= simple_form_for @nato, url: { action: action } do |f| | |
= f.input :member_countries, as: :country, input_html: { class: 'chosen-select', multiple: true } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Select for choosing multiple countries.