Module: ActionView::Helpers::ToLanguageSelectTag

Included in:
InstanceTag, LanguageSelect
Defined in:
lib/language_select.rb

Instance Method Summary collapse

Instance Method Details

#to_language_select_tag(priority_languages, options, html_options) ⇒ Object



76
77
78
79
80
81
82
83
84
85
86
# File 'lib/language_select.rb', line 76

def to_language_select_tag(priority_languages, options, html_options)
  html_options = html_options.stringify_keys
  add_default_name_and_id(html_options)
  value = value(object)
  ("select",
    add_options(
      language_options_for_select(value, priority_languages),
      options, value
    ), html_options
  )
end