Skip to content

Commit a71350c

Browse files
committed
Revert "Don't unhook autoloading in production"
This reverts commit a8bf129.
1 parent 05b6e5d commit a71350c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

railties/lib/rails/application/finisher.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ module Finisher
108108
ActionDispatch::Reloader.to_cleanup(&callback)
109109
end
110110
end
111+
112+
# Disable dependency loading during request cycle
113+
initializer :disable_dependency_loading do
114+
if config.eager_load && config.cache_classes
115+
ActiveSupport::Dependencies.unhook!
116+
end
117+
end
111118
end
112119
end
113120
end

0 commit comments

Comments
 (0)