Open
Description
Is it possible to abort/halt a transition whilst inside a around_transition
. The example I have here is:
around_transition do |cost_item, transition, block|
if ticket.access_keys.any?(&:full?)
# abort transition!
false
else
block.call
ticket.send(:redeem_access_key, transition)
end
end
Is returning false
sufficient. According to the readme and the rubydoc there is no mention of this:
http://www.rubydoc.info/github/pluginaweek/state_machine/StateMachine%2FMachine%3Aaround_transition
Metadata
Metadata
Assignees
Labels
No labels