Class: ActionView::Helpers::InstanceTag

Inherits:
Object
  • Object
show all
Defined in:
lib/norwegian_county_select.rb

Instance Method Summary collapse

Instance Method Details

#to_norwegian_county_select_tag(options, html_options) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/norwegian_county_select.rb', line 21

def to_norwegian_county_select_tag(options, html_options)
  html_options = html_options.stringify_keys
  add_default_name_and_id(html_options)
  value = value(object)
  ("select",
    add_options(
      norwegian_county_options_for_select(value),
      options, value
    ), html_options
  )
end