Skip to content

Commit 3d1c2a0

Browse files
Merge pull request #200 from spark-solutions/fix/stack_level_for_payment_decorator
Fix problem with stack level too deep on PaymentDecorator
2 parents 5ffdeaf + 51be2db commit 3d1c2a0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Spree::Payment.class_eval do
2-
alias_method :original_update_order, :update_order
3-
4-
def update_order
5-
# without reload order was updated with inaccurate data
6-
order.reload
7-
original_update_order
1+
module Spree
2+
module PaymentDecorator
3+
def update_order
4+
# without reload order was updated with inaccurate data
5+
order.reload && super
6+
end
87
end
98
end
9+
10+
Spree::Payment.prepend Spree::PaymentDecorator

0 commit comments

Comments
 (0)