Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include AASM
- aasm column: 'state' do
- state :pending, initial: true
- state :processing
- state :finished
- state :errored
- event :process, after: :charge_card do
- transitions from: :pending, to: :processing
- end
- event :finish do
- transitions from: :processing, to: :finished
- end
- event :fail do
- transitions from: :processing, to: :errored
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement