Class: CollectionSelectInput
- Inherits:
-
SimpleForm::Inputs::CollectionSelectInput
- Object
- SimpleForm::Inputs::CollectionSelectInput
- CollectionSelectInput
- Defined in:
- app/inputs/collection_select_input.rb
Overview
Overrides SimpleForm’s default CollectionSelectInput to add a class. This class is then used to initialise Select2 on all collection select inputs.
Instance Method Summary collapse
Instance Method Details
#input_html_classes ⇒ Object
5 6 7 |
# File 'app/inputs/collection_select_input.rb', line 5 def input_html_classes super.push('pure-admin-select') end |
#input_html_options ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/inputs/collection_select_input.rb', line 9 def super.deep_merge( style: 'width: 100%;', data: { tags: [:create_when_no_match] || false } ) end |