From 8bf9921eef43ed02e54258ef78e02249e1861726 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 9 May 2014 14:39:12 +1000 Subject: [PATCH] Turn off enforce_available_locales, working around performance regression https://github.com/svenfuchs/i18n/issues/230 --- config/application.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index f36691ebb5..45c6e2a540 100644 --- a/config/application.rb +++ b/config/application.rb @@ -63,7 +63,10 @@ module Openfoodnetwork # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = 'en' - I18n.config.enforce_available_locales = true + # Setting this to true causes a performance regression in Rails 3.2.17 + # When we're on a version with the fix below, we can set it to true + # https://github.com/svenfuchs/i18n/issues/230 + I18n.config.enforce_available_locales = false # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8"