Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 5613fb0b8751440f162ffc59869848ecb41acaf2 1 parent b892b4c
@homakov homakov authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 railties/lib/rails/application/bootstrap.rb
View
12 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.
Please sign in to comment.
Something went wrong with that request. Please try again.