Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 5613fb0b8751440f162ffc59869848ecb41acaf2 1 parent b892b4c
Egor Homakov authored May 11, 2012
12  railties/lib/rails/application/bootstrap.rb
@@ -10,7 +10,17 @@ module Bootstrap
10 10
       initializer :load_environment_hook, :group => :all do end
11 11
 
12 12
       initializer :load_active_support, :group => :all do
13  
-        require "active_support/all" unless config.active_support.bare
  13
+        unless config.active_support.bare
  14
+          require "active_support/all" 
  15
+          
  16
+          # Assign config options of JSON encoding
  17
+          [:escape_html_entities_in_json, :use_standard_json_time_format, :encode_big_decimal_as_string].each do |option|
  18
+            value = config.active_support.send(option)
  19
+            if !value.nil?
  20
+              ActiveSupport::JSON::Encoding.send("#{option}=", value)
  21
+            end
  22
+          end
  23
+        end
14 24
       end
15 25
 
16 26
       # Preload all frameworks specified by the Configuration#frameworks.

0 notes on commit 5613fb0

Please sign in to comment.
Something went wrong with that request. Please try again.