diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-06-22 14:09:27 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-06-22 14:09:27 -0300 |
commit | 80b416f5e692ae79f4062f59fed6c7d7648a8af0 (patch) | |
tree | 9a276a6c445f3b7b6b6dce59588be7c9c69790ef /railties/lib/rails/application | |
parent | 7b0b3d835a2e0a75659f1c1ca178233888d65f16 (diff) | |
download | rails-80b416f5e692ae79f4062f59fed6c7d7648a8af0.tar.gz rails-80b416f5e692ae79f4062f59fed6c7d7648a8af0.tar.bz2 rails-80b416f5e692ae79f4062f59fed6c7d7648a8af0.zip |
Add option to enable dependency loading in production
This will make easier to applications that rely on having const_missing
hooks in production upgrade to Rails 5.
This option is going to be remove in the future and the default behavior
will be to disable the dependency loading.
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 97dde9a3e9..daf3a24b16 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -176,7 +176,7 @@ module Rails # Disable dependency loading during request cycle initializer :disable_dependency_loading do - if config.eager_load && config.cache_classes + if config.eager_load && config.cache_classes && !config.enable_dependency_loading ActiveSupport::Dependencies.unhook! end end |