Created
May 10, 2012 16:31
-
-
Save srbiv/2654322 to your computer and use it in GitHub Desktop.
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
state_machine :state, intial: :active do | |
event :free_trial_signed_up do | |
transition all => :free_trial | |
end | |
event :account_created do | |
transition all => :active | |
end | |
event :free_trial_lapsed do | |
transition :free_trial => :abandoned | |
end | |
event :contract_lapsed do | |
transition :active => :lapsed | |
end | |
event :contract_expired do | |
transition :lapsed => :inactive | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment