Module: ActionView::Helpers::ToCountrySelectTag
- Included in:
- CountrySelect, InstanceTag
- Defined in:
- lib/i18n_plus/country.rb
Instance Method Summary collapse
Instance Method Details
#to_country_select_tag(priority_country_codes, options, html_options) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/i18n_plus/country.rb', line 48 def to_country_select_tag(priority_country_codes, , ) .symbolize_keys! .stringify_keys! add_default_name_and_id() _, value = option_text_and_value(object) selected_value = .has_key?(:selected) ? [:selected] : value opts = ((selected_value, *priority_country_codes), , value) content_tag(:select, opts, ) end |