Remove hard-coded fallback to English locale

In production mode the English locale is always used as fallback.
In development mode there is currently no fallback, so the English
locale isn't loaded and the second call to I18n.l() fails too.
This commit is contained in:
Gerhard Schlager 2015-09-06 21:20:16 +02:00
parent 3a1c83bc35
commit 3dd9dbf757
1 changed files with 0 additions and 3 deletions

View File

@ -41,11 +41,8 @@ class UserNotifications < ActionMailer::Base
build_email( user.email, template: "user_notifications.account_created", email_token: opts[:email_token])
end
# On error, use english
def short_date(dt)
I18n.l(dt, format: :short)
rescue I18n::MissingTranslationData
I18n.l(dt, format: :short, locale: 'en')
end
def digest(user, opts={})