Skip to content

Instantly share code, notes, and snippets.

@braidn
Created September 30, 2014 15:02
Show Gist options
  • Save braidn/bc9d134be2430eb7dbcb to your computer and use it in GitHub Desktop.
Save braidn/bc9d134be2430eb7dbcb to your computer and use it in GitHub Desktop.
module Spree
class Order
Checkout.module_eval do
set_callback :updating_from_params, :after, :clear_extra_payment
def clear_extra_payment
byebug
if self.payments && self.payments.count > 1
self.payments.last.delete
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment