Skip to content

Commit 51be2db

Browse files
Fix problem with stack level too deep on PaymentDecorator
1 parent 5ffdeaf commit 51be2db

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)