-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problem with stack level too deep on PaymentDecorator
- Loading branch information
1 parent
5ffdeaf
commit 51be2db
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
Spree::Payment.class_eval do | ||
alias_method :original_update_order, :update_order | ||
|
||
def update_order | ||
# without reload order was updated with inaccurate data | ||
order.reload | ||
original_update_order | ||
module Spree | ||
module PaymentDecorator | ||
def update_order | ||
# without reload order was updated with inaccurate data | ||
order.reload && super | ||
end | ||
end | ||
end | ||
|
||
Spree::Payment.prepend Spree::PaymentDecorator |