Class: ActionView::Helpers::InstanceTag

Inherits:
Object
  • Object
show all
Defined in:
lib/uncharted/extensions/rails.rb

Instance Method Summary collapse

Instance Method Details

#to_country_select_tag(priority_countries, options, html_options) ⇒ Object



48
49
50
51
52
53
# File 'lib/uncharted/extensions/rails.rb', line 48

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

#to_territory_select_tag(priority_territories, options, html_options) ⇒ Object



55
56
57
58
59
60
# File 'lib/uncharted/extensions/rails.rb', line 55

def to_territory_select_tag(priority_territories, options, html_options)
  html_options = html_options.stringify_keys
  add_default_name_and_id(html_options)
  value = value(object)
  ("select", add_options(territory_options_for_select(value, priority_territories), options, value), html_options)
end