Module: ActionView::Helpers::ToCountrySelectTag

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

Instance Method Summary collapse

Instance Method Details

#to_country_select_tag(priority_countries, options, html_options) ⇒ Object



74
75
76
77
78
79
80
81
82
83
84
# File 'lib/country_select.rb', line 74

def to_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(
      country_options_for_select(value, priority_countries),
      options, value
    ), html_options
  )
end