Skip to content

Commit 53d9e17

Browse files
authored
Explain why we set the AS load mechanism conditionally
1 parent 6cdfaf5 commit 53d9e17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/spring/application.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def preload
100100
# override the effect of config.cache_classes = true. We can then actually
101101
# set config.cache_classes = false after loading the environment.
102102
Rails::Application.initializer :initialize_dependency_mechanism, group: :all do
103+
# Rails 7 dropped classic mode, and this setter does not exist anymore.
103104
if ActiveSupport::Dependencies.respond_to?(:mechanism=)
104105
ActiveSupport::Dependencies.mechanism = :load
105106
end

0 commit comments

Comments
 (0)