1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/models/simple_example.rb
Dāvis Namsons f7231d1c31 Feature: Add permitted_transitions to group permitted event with state (#664)
* Feature: Add permitted_transitions to group permitted event with state

resolves #656
2020-02-08 18:19:30 +05:30

23 lines
422 B
Ruby

class SimpleExample
include AASM
aasm do
state :initialised, :initial => true
state :filled_out
state :denied
state :authorised
event :fill_out do
transitions :from => :initialised, :to => :filled_out
end
event :deny do
transitions from: :initialised, to: :denied
end
event :authorise do
transitions :from => :filled_out, :to => :authorised
end
end
end