lib/schemacop/railtie.rb in schemacop-3.0.1 vs lib/schemacop/railtie.rb in schemacop-3.0.2
- old
+ new
@@ -5,10 +5,10 @@
unless Rails.env.development?
V3::GlobalContext.eager_load!
end
# Tell Zeitwerk to ignore the files in our load path
- if defined?(Rails) && defined?(Zeitwerk)
+ if defined?(Rails) && defined?(Zeitwerk) && Rails.autoloaders.zeitwerk_enabled?
Schemacop.load_paths.each do |load_path|
Rails.autoloaders.main.ignore(Rails.root.join(load_path))
end
end
end