aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-12-05 12:46:22 +0100
committerYves Senn <yves.senn@gmail.com>2013-12-05 13:19:51 +0100
commit73b57a515f650595b21b9f26b4a5a3c9c982691e (patch)
tree537593924b3da1aadc30f9722af4dbf65f9c7019 /activesupport/lib
parentd71c1fc6a7f4a7fcdb84b8c091fb29c53b09dc68 (diff)
downloadrails-73b57a515f650595b21b9f26b4a5a3c9c982691e.tar.gz
rails-73b57a515f650595b21b9f26b4a5a3c9c982691e.tar.bz2
rails-73b57a515f650595b21b9f26b4a5a3c9c982691e.zip
set `i18n.enforce_available_locales` before `i18n.default_locale`.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/i18n_railtie.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/i18n_railtie.rb b/activesupport/lib/active_support/i18n_railtie.rb
index 890dd9380b..dcdea70443 100644
--- a/activesupport/lib/active_support/i18n_railtie.rb
+++ b/activesupport/lib/active_support/i18n_railtie.rb
@@ -31,6 +31,11 @@ module I18n
fallbacks = app.config.i18n.delete(:fallbacks)
+ if app.config.i18n.has_key?(:enforce_available_locales)
+ # this option needs to be set before `default_locale=` to work properly.
+ I18n.enforce_available_locales = app.config.i18n.delete(:enforce_available_locales)
+ end
+
app.config.i18n.each do |setting, value|
case setting
when :railties_load_path