Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor order #refund_total #3134

Merged

Conversation

twist900
Copy link
Contributor

@twist900 twist900 commented Mar 6, 2019

Description

Refactor Spree::Order#refund_total to perform calculations through the refunds relation.
A cleaner solution that also removes the n+1 query issue.

Checklist:

Calculate refund total through the `refunds` relation also
removing the n+1 queries.
Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are already some tests covering this, so I am okay with this change.

Thanks for the PR @twist900 🎉

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, thanks! 👍

@kennyadsl kennyadsl merged commit ec84e0e into solidusio:master Mar 8, 2019
@kennyadsl kennyadsl deleted the twist900/refactor-order-refund-total branch March 8, 2019 15:06
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.

3 participants