Skip to content

Zeitwerk conditionally ignore payments_controller.rb #1

Open
mateus-po wants to merge 1 commit into
mainfrom
sp-169/zeitwerk-ignore-payments-controller-when-spree-frontend-not-loaded
Open

Zeitwerk conditionally ignore payments_controller.rb #1
mateus-po wants to merge 1 commit into
mainfrom
sp-169/zeitwerk-ignore-payments-controller-when-spree-frontend-not-loaded

Conversation

@mateus-po
Copy link
Copy Markdown
Collaborator

When loading spree_stripe without loading spree_frontend (which is optional and doesn't have to be included) there is Zeitwerk error. The error stems from the fact that the file spree_stripe/app/controllers/spree/spree_stripe/payments_controller.rb doesn't define a PaymentsController class when spree_frontend isn't loaded. The solution is to conditionally ignore said file while running autoloader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant