Created
August 1, 2013 06:33
-
-
Save pavelnikolov/6128913 to your computer and use it in GitHub Desktop.
Order decorator
This file contains hidden or 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
module Spree | |
Order.class_eval do | |
state_machine.after_transition :to => :complete, :do => :add_subscription | |
def add_subscription(transition) | |
# add subscription here - the method is not being called after successfully paying the order. The order and the payment both have state "complete" in the DB | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment