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

Fix method missing error #2162

Merged
merged 2 commits into from
Aug 21, 2017

Conversation

luukveenis
Copy link

return_items is a has_many association, but we're currently calling return_item.sum(:amount) which raises a method missing error.

Luuk Veenis added 2 commits August 17, 2017 09:54
The `Spree::ReturnAuthorization#amount` method currently calls:
  `return_item.sum(:amount)`
This will raise a method missing error because the association is a
`has_many`, so we need to call `return_items.sum(:amount)`.
`return_items` is a `has_many` association, but we're currently calling
`return_item.sum(:amount)` which raises a method missing error.
@jhawthorn jhawthorn merged commit 39c8fd7 into solidusio:master Aug 21, 2017
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.

4 participants