diff options
author | Egor Homakov <homakov@gmail.com> | 2012-05-11 18:11:58 +0400 |
---|---|---|
committer | Egor Homakov <homakov@gmail.com> | 2012-05-11 18:11:58 +0400 |
commit | 5613fb0b8751440f162ffc59869848ecb41acaf2 (patch) | |
tree | 6c89932a35f46f0c19ce4c28125c4ea10be8f84a /railties/lib/rails/application | |
parent | b892b4c08fe2cba133882252c64d123e319eb174 (diff) | |
download | rails-5613fb0b8751440f162ffc59869848ecb41acaf2.tar.gz rails-5613fb0b8751440f162ffc59869848ecb41acaf2.tar.bz2 rails-5613fb0b8751440f162ffc59869848ecb41acaf2.zip |
Update railties/lib/rails/application/bootstrap.rb
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index e567df7162..15c5766395 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -10,7 +10,17 @@ module Rails initializer :load_environment_hook, :group => :all do end initializer :load_active_support, :group => :all do - require "active_support/all" unless config.active_support.bare + unless config.active_support.bare + require "active_support/all" + + # Assign config options of JSON encoding + [:escape_html_entities_in_json, :use_standard_json_time_format, :encode_big_decimal_as_string].each do |option| + value = config.active_support.send(option) + if !value.nil? + ActiveSupport::JSON::Encoding.send("#{option}=", value) + end + end + end end # Preload all frameworks specified by the Configuration#frameworks. |