Module: Locomotive::SitesHelper
- Defined in:
- app/helpers/locomotive/sites_helper.rb
Instance Method Summary collapse
- #options_for_site_locales ⇒ Object
- #options_for_site_timezones ⇒ Object
- #ordered_current_site_locales ⇒ Object
Instance Method Details
#options_for_site_locales ⇒ Object
8 9 10 11 12 |
# File 'app/helpers/locomotive/sites_helper.rb', line 8 def Locomotive.config.site_locales.map do |locale| [I18n.t("locomotive.locales.#{locale}"), locale] end end |
#options_for_site_timezones ⇒ Object
14 15 16 17 18 |
# File 'app/helpers/locomotive/sites_helper.rb', line 14 def ActiveSupport::TimeZone.all.map do |tz| [tz, tz.name] end end |
#ordered_current_site_locales ⇒ Object
4 5 6 |
# File 'app/helpers/locomotive/sites_helper.rb', line 4 def ordered_current_site_locales current_site.locales + (Locomotive.config.site_locales - current_site.locales) end |