Skip to content

Commit

Permalink
Explain why we set the AS load mechanism conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn authored Aug 24, 2021
1 parent 6cdfaf5 commit 53d9e17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/spring/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def preload
# override the effect of config.cache_classes = true. We can then actually
# set config.cache_classes = false after loading the environment.
Rails::Application.initializer :initialize_dependency_mechanism, group: :all do
# Rails 7 dropped classic mode, and this setter does not exist anymore.
if ActiveSupport::Dependencies.respond_to?(:mechanism=)
ActiveSupport::Dependencies.mechanism = :load
end
Expand Down

0 comments on commit 53d9e17

Please sign in to comment.