aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-07 17:19:33 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-07 17:20:57 -0300
commit0a120a818d413c64ff9867125f0b03788fc306f8 (patch)
treedd9dbb389af54b8300100ce197e9f319e7120d15 /activesupport
parent44cfb2ab8a57627bca826bf68ffb1cf26ee55fdb (diff)
downloadrails-0a120a818d413c64ff9867125f0b03788fc306f8.tar.gz
rails-0a120a818d413c64ff9867125f0b03788fc306f8.tar.bz2
rails-0a120a818d413c64ff9867125f0b03788fc306f8.zip
Avoid to define an initializer after the load_config_initializers
This make the config/initializers run before the railties are loaded what can break some configurations.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support.rb8
-rw-r--r--activesupport/lib/active_support/railtie.rb7
2 files changed, 8 insertions, 7 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index 9af3f8b447..588d6c49f9 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -73,6 +73,14 @@ module ActiveSupport
end
cattr_accessor :test_order # :nodoc:
+
+ def self.halt_callback_chains_on_return_false
+ Callbacks::CallbackChain.halt_and_display_warning_on_return_false
+ end
+
+ def self.halt_callback_chains_on_return_false=(value)
+ Callbacks::CallbackChain.halt_and_display_warning_on_return_false = value
+ end
end
autoload :I18n, "active_support/i18n"
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index ef22433491..cd0fb51009 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -13,13 +13,6 @@ module ActiveSupport
end
end
- initializer "active_support.halt_callback_chains_on_return_false", after: :load_config_initializers do |app|
- if app.config.active_support.key? :halt_callback_chains_on_return_false
- ActiveSupport::Callbacks::CallbackChain.halt_and_display_warning_on_return_false = \
- app.config.active_support.halt_callback_chains_on_return_false
- end
- end
-
# Sets the default value for Time.zone
# If assigned value cannot be matched to a TimeZone, an exception will be raised.
initializer "active_support.initialize_time_zone" do |app|