Created
September 9, 2019 22:15
-
-
Save hazeledmands/41979d526f4a9a19cb32ab63363b2b21 to your computer and use it in GitHub Desktop.
Example of the aasm gem
This file contains 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
aasm column: 'state' do | |
state :pending, initial: true | |
state :enqueued | |
state :cancelled | |
state :failed | |
event :enqueue do | |
transitions from: :pending, to: :enqueued | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment