aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/railtie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r--activesupport/lib/active_support/railtie.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index 39c83f65a3..1b4ecf4d72 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -8,8 +8,9 @@ module ActiveSupport
config.eager_load_namespaces << ActiveSupport
initializer "active_support.reset_all_current_attributes_instances" do |app|
- app.executor.to_run { ActiveSupport::CurrentAttributes.reset_all }
- app.executor.to_complete { ActiveSupport::CurrentAttributes.reset_all }
+ app.reloader.before_class_unload { ActiveSupport::CurrentAttributes.clear_all }
+ app.executor.to_run { ActiveSupport::CurrentAttributes.reset_all }
+ app.executor.to_complete { ActiveSupport::CurrentAttributes.reset_all }
end
initializer "active_support.deprecation_behavior" do |app|