21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-15 06:58:39 +02:00
chexpire/app/helpers/application_helper.rb

14 lines
305 B
Ruby
Raw Normal View History

2018-05-23 10:32:04 +02:00
module ApplicationHelper
2018-07-04 12:33:50 +02:00
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
2018-06-13 20:28:37 +02:00
def available_locales_collection
I18n.available_locales.map { |k| [t("shared.locales.#{k}"), k] }
2018-06-13 20:28:37 +02:00
end
2018-05-23 10:32:04 +02:00
end