module ActiveSupport::Dependencies::ZeitwerkIntegration
def setup_autoloaders(enable_reloading)
def setup_autoloaders(enable_reloading) Dependencies.autoload_paths.each do |autoload_path| # Zeitwerk only accepts existing directories in `push_dir` to # prevent misconfigurations. next unless File.directory?(autoload_path) autoloader = \ autoload_once?(autoload_path) ? Rails.autoloaders.once : Rails.autoloaders.main autoloader.push_dir(autoload_path) autoloader.do_not_eager_load(autoload_path) unless eager_load?(autoload_path) end Rails.autoloaders.main.enable_reloading if enable_reloading Rails.autoloaders.each(&:setup) end