21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-29 07:20:50 +02:00
chexpire/app/helpers/application_helper.rb
2018-07-05 10:27:48 +02:00

14 lines
305 B
Ruby

module ApplicationHelper
def format_date(time, format: :long)
l(time.utc.to_date, format: format)
end
def format_utc(time, format: :default)
l(time.utc, format: format)
end
def available_locales_collection
I18n.available_locales.map { |k| [t("shared.locales.#{k}"), k] }
end
end