diff --git a/config/initializers/zeitwerk.rb b/config/initializers/zeitwerk.rb new file mode 100644 index 0000000..e72a72b --- /dev/null +++ b/config/initializers/zeitwerk.rb @@ -0,0 +1,8 @@ +# ignoring files by Zeitwerk when spree_frontend isn't loaded +unless ::Spree::Core::Engine.frontend_available? + Dir.chdir(Rails.root.join("..")) + files_to_ignore = Dir["**/spree_stripe/payments_controller.rb"] + files_to_ignore.each { |file| + Rails.autoloaders.main.ignore(Rails.root.join("../#{file}")) + } +end \ No newline at end of file