Disable in development (server)

This commit is contained in:
Kane York 2015-07-15 09:49:22 -07:00
parent ecfa17b5a7
commit 650eb86a74
1 changed files with 12 additions and 1 deletions

View File

@ -21,4 +21,15 @@ class FallbackLocaleList < Hash
self[I18n.locale].each { |l| I18n.ensure_loaded! l }
end
end
I18n.fallbacks = FallbackLocaleList.new
class NoFallbackLocaleList < FallbackLocaleList
def [](locale)
[locale]
end
end
if Rails.env.production?
I18n.fallbacks = FallbackLocaleList.new
else
I18n.fallbacks = NoFallbackLocaleList.new
end