diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/autoloaders.rb | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 1f533a8c04..663960bb77 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -6,6 +6,7 @@ require "pathname" require "active_support" require "active_support/dependencies/autoload" +require "active_support/dependencies/zeitwerk_integration" require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/module/delegation" require "active_support/core_ext/array/extract_options" diff --git a/railties/lib/rails/autoloaders.rb b/railties/lib/rails/autoloaders.rb index a6974cc207..36444ef05e 100644 --- a/railties/lib/rails/autoloaders.rb +++ b/railties/lib/rails/autoloaders.rb @@ -7,13 +7,19 @@ module Rails def main if zeitwerk_enabled? - @main ||= Zeitwerk::Loader.new.tap { |loader| loader.tag = "rails.main" } + @main ||= Zeitwerk::Loader.new.tap do |loader| + loader.tag = "rails.main" + loader.inflector = ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector + end end end def once if zeitwerk_enabled? - @once ||= Zeitwerk::Loader.new.tap { |loader| loader.tag = "rails.once" } + @once ||= Zeitwerk::Loader.new.tap do |loader| + loader.tag = "rails.once" + loader.inflector = ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector + end end end |