Module: ActionView::Helpers::ToCountrySelectTag

Included in:
CountrySelect, InstanceTag
Defined in:
lib/localized_country_select.rb

Instance Method Summary collapse

Instance Method Details

#to_localized_country_select_tag(priority_countries, options, html_options) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
# File 'lib/localized_country_select.rb', line 99

def to_localized_country_select_tag(priority_countries, options, html_options)
  html_options = html_options.stringify_keys
  add_default_name_and_id(html_options)
  value = value(object)
  ("select",
    add_options(
      localized_country_options_for_select(value, priority_countries, options).html_safe,
      options, value
    ), html_options
  )
end