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_with_guard_args.rb

17 lines
364 B
Ruby

class SimpleExampleWithGuardArgs
include AASM
aasm do
state :initialised, :initial => true
state :filled_out_with_args
event :fill_out_with_args do
transitions :guard => [:arg_is_valid?],
:from => :initialised,
:to => :filled_out_with_args
end
end
def arg_is_valid?(arg)
return arg
end
end