Module: Kiqr::Frontend::FormHelpers

Defined in:
lib/kiqr/frontend/form_helpers.rb

Instance Method Summary collapse

Instance Method Details

#options_for_localeObject

Get the options for the locale form select field



5
6
7
8
9
# File 'lib/kiqr/frontend/form_helpers.rb', line 5

def options_for_locale
  I18n.available_locales.map do |locale|
    [ I18n.t("kiqr.translations.locales.#{locale}"), locale ]
  end
end

#options_for_time_zoneObject

Get the options for time zone form select field



12
13
14
15
16
# File 'lib/kiqr/frontend/form_helpers.rb', line 12

def options_for_time_zone
  ActiveSupport::TimeZone.all.map do |time_zone|
    [ time_zone.to_s, time_zone.name ]
  end
end