aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/railtie.rb7
-rw-r--r--railties/lib/rails/application/bootstrap.rb12
2 files changed, 8 insertions, 11 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index d1c62c5087..30ac881090 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -24,5 +24,12 @@ module ActiveSupport
Time.zone_default = zone_default
end
+
+ initializer "active_support.set_configs" do |app|
+ app.config.active_support.each do |k, v|
+ k = "#{k}="
+ ActiveSupport.send(k, v) if ActiveSupport.respond_to? k
+ end
+ end
end
end
diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb
index 15c5766395..e567df7162 100644
--- a/railties/lib/rails/application/bootstrap.rb
+++ b/railties/lib/rails/application/bootstrap.rb
@@ -10,17 +10,7 @@ module Rails
initializer :load_environment_hook, :group => :all do end
initializer :load_active_support, :group => :all do
- 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
+ require "active_support/all" unless config.active_support.bare
end
# Preload all frameworks specified by the Configuration#frameworks.