diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-16 17:12:37 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-17 09:06:56 -0200 |
commit | 8e21ae37ad9fef6b7393a84f9b5f2e18a831e49a (patch) | |
tree | e57a563efdab3bde84e411e4be85ef456b568630 /guides/source | |
parent | 6802196a6b7db928f9dc70fe5a4f3b61a3ea33ce (diff) | |
download | rails-8e21ae37ad9fef6b7393a84f9b5f2e18a831e49a.tar.gz rails-8e21ae37ad9fef6b7393a84f9b5f2e18a831e49a.tar.bz2 rails-8e21ae37ad9fef6b7393a84f9b5f2e18a831e49a.zip |
Add changelog and upgrading notice related to I18n enforce_available_locales handling
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index ca5623bf73..1c233b4d82 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -156,6 +156,23 @@ end ActiveRecord::FixtureSet.context_class.send :include, FixtureFileHelpers ``` +### I18n enforcing available locales + +Rails 4.1 now defaults the I18n option `enforce_available_locales` to `true`, +meaning that it will make sure that all locales passed to it must be declared in +the `available_locales` list. + +To disable it (and allow I18n to accept *any* locale option) add the following +configuration to your application: + +```ruby +config.i18n.enforce_available_locales = false +``` + +Note that this option was added as a security measure, to ensure user input could +not be used as locale information unless previously known, so it's recommended not +to disable this option unless you have a strong reason for doing so. + Upgrading from Rails 3.2 to Rails 4.0 ------------------------------------- |