Skip to content

Instantly share code, notes, and snippets.

@hazeledmands
Created September 9, 2019 22:15
Show Gist options
  • Save hazeledmands/41979d526f4a9a19cb32ab63363b2b21 to your computer and use it in GitHub Desktop.
Save hazeledmands/41979d526f4a9a19cb32ab63363b2b21 to your computer and use it in GitHub Desktop.
Example of the aasm gem
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