stateful_enum
stateful_enum copied to clipboard
[Question] How should we prevent the after hook from running if we threw :abort in the before hook?
Hi folks! Hope that it is okay to open up an issue for this question. The after hook ran even I throw :abort in the before hook, is this by design? Right now, I'm just using an if statement to check if I should continue to run the after hook. Is there a better way of doing this?
after do
if status == "the status it should transitioned to"
run the after transition code
end
end