Skip to content

Commit

Permalink
Fix problem with stack level too deep on PaymentDecorator
Browse files Browse the repository at this point in the history
  • Loading branch information
VygovskySergey committed Aug 14, 2018
1 parent 5ffdeaf commit 51be2db
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/models/spree/payment_decorator.rb
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

0 comments on commit 51be2db

Please # to comment.