Class: ActionView::Helpers::FormBuilder

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

Instance Method Summary collapse

Instance Method Details

#country_code_select(method, options = {}, html_options = {}, &block) ⇒ Object

US => United States



29
30
31
# File 'lib/i18n_form_helper.rb', line 29

def country_code_select(method, options = {}, html_options = {}, &block)
  @template.select(@object_name, method, FormSelectOptions::CountryOptions.code_to_english_country_name, objectify_options(options), @default_options.merge(html_options), &block)
end

#country_name_select(method, options = {}, html_options = {}, &block) ⇒ Object

United States => United States



24
25
26
# File 'lib/i18n_form_helper.rb', line 24

def country_name_select(method, options = {}, html_options = {}, &block)
  @template.select(@object_name, method, FormSelectOptions::CountryOptions.english_country_name_to_english_country_name, objectify_options(options), @default_options.merge(html_options), &block)
end

#language_code_select(method, options = {}, html_options = {}, &block) ⇒ Object

en => English no => Norsk



19
20
21
# File 'lib/i18n_form_helper.rb', line 19

def language_code_select(method, options = {}, html_options = {}, &block)
  @template.select(@object_name, method, FormSelectOptions::LanguageOptions.code_to_native_name, objectify_options(options), @default_options.merge(html_options), &block)
end

#language_name_select(method, options = {}, html_options = {}, &block) ⇒ Object

English => English



8
9
10
# File 'lib/i18n_form_helper.rb', line 8

def language_name_select(method, options = {}, html_options = {}, &block)
  @template.select(@object_name, method, FormSelectOptions::LanguageOptions.english_name_to_english_name, objectify_options(options), @default_options.merge(html_options), &block)
end

#language_native_select(method, options = {}, html_options = {}, &block) ⇒ Object

Norge => Norge



13
14
15
# File 'lib/i18n_form_helper.rb', line 13

def language_native_select(method, options = {}, html_options = {}, &block)
  @template.select(@object_name, method, FormSelectOptions::LanguageOptions.native_name_to_native_name, objectify_options(options), @default_options.merge(html_options), &block)
end