Class: ExpressTemplates::Components::Forms::CountrySelect
- Inherits:
-
Select
- Object
- Select
- ExpressTemplates::Components::Forms::CountrySelect
- Defined in:
- app/components/express_admin/country_select.rb
Instance Method Summary collapse
Instance Method Details
#select_helper_options ⇒ Object
16 17 18 |
# File 'app/components/express_admin/country_select.rb', line 16 def add_select2_class( input_attributes.merge(include_blank: false, prompt: "-- Please Select --" ) ) end |
#select_options ⇒ Object
9 10 11 12 13 14 |
# File 'app/components/express_admin/country_select.rb', line 9 def = ISO3166::Country.all.map {|country| [country.name.titleize, country.alpha2]} us = .delete(['United States', 'US']) .unshift us helpers.(, selected_value) end |