diff --git a/lib/qa/engine.rb b/lib/qa/engine.rb index 0b588ba..95d7b8c 100644 --- a/lib/qa/engine.rb +++ b/lib/qa/engine.rb @@ -4,5 +4,16 @@ module Qa class Engine < ::Rails::Engine isolate_namespace Qa + + config.before_configuration do + # see https://github.com/fxn/zeitwerk#for_gem + # Blacklight puts a generator into LOCAL APP lib/generators, so tell + # zeitwerk to ignore the whole directory? If we're using zeitwerk + # + # See: https://github.com/cbeer/engine_cart/issues/117 + if Rails.autoloaders&.main.respond_to?(:ignore) + Rails.autoloaders.main.ignore(Rails.root.join('lib/generators')) + end + end end end