Skip to content
Permalink
Browse files

Revert "Don't unhook autoloading in production"

This reverts commit a8bf129.
  • Loading branch information
tenderlove committed Feb 16, 2015
1 parent 05b6e5d commit a71350cae0082193ad8c66d65ab62e8bb0b7853b
Showing with 7 additions and 0 deletions.
  1. +7 −0 railties/lib/rails/application/finisher.rb
@@ -108,6 +108,13 @@ module Finisher
ActionDispatch::Reloader.to_cleanup(&callback)
end
end

# Disable dependency loading during request cycle
initializer :disable_dependency_loading do
if config.eager_load && config.cache_classes
ActiveSupport::Dependencies.unhook!
end
end
end
end
end

6 comments on commit a71350c

@pixeltrix

This comment has been minimized.

Copy link
Member

@pixeltrix pixeltrix replied Mar 7, 2016

Didn't spot that a8bf129 got reverted. @jeremy ISTR that you needed this for some of your apps - is that still the case or are we only talking about legacy apps that won't be upgraded to Rails 5?

@zdennis

This comment has been minimized.

Copy link
Contributor

@zdennis zdennis replied Apr 12, 2016

@tenderlove, TY for reverting this. Any chance this will be backported to the 4.x series?

@rafaelfranca

This comment has been minimized.

Copy link
Member

@rafaelfranca rafaelfranca replied Jun 22, 2016

@zdennis no. This i a huge change.

@prathamesh-sonpatki

This comment has been minimized.

Copy link
Member

@prathamesh-sonpatki prathamesh-sonpatki replied Jun 30, 2016

@rafaelfranca Anything needs to be mentioned in upgrade guides and release notes about this commit?

@rafaelfranca

This comment has been minimized.

Copy link
Member

@rafaelfranca rafaelfranca replied Jun 30, 2016

Yes. It needs to mention that if folder in the autoload_paths but not in the eager_load_paths are not going to be loaded in production.

@TylerRick

This comment has been minimized.

Copy link
Contributor

@TylerRick TylerRick replied Mar 8, 2018

Adding a link back to #13142 (comment) where this commit was discussed

Please sign in to comment.
You can’t perform that action at this time.