Permalink
Browse files

Update railties/lib/rails/application/bootstrap.rb

  • Loading branch information...
1 parent b892b4c commit 5613fb0b8751440f162ffc59869848ecb41acaf2 @homakov homakov committed May 11, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 railties/lib/rails/application/bootstrap.rb
@@ -10,7 +10,17 @@ module Bootstrap
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.

0 comments on commit 5613fb0

Please sign in to comment.