Verifies that undo is coherently configured.
Checks, in order:
undorequires atransition_log. Undo reverses a logged row; without a log there is nothing to reverse and no target to rewind to.- The log resource must declare a self-referencing
belongs_to :undoes, the pointer from an undo row to the row it reverses. Regenerate the log withmix ash_workflow.gen.transition_logif it predates undo. undorequires at least one transition markedundoable?: true, so anundoblock that can never fire is a compile error rather than an action that always refuses.undoable?: truerequires anundoblock, for the same reason in reverse.same_actor?requiresbelongs_to_actoron the log. Without a recorded actor there is nothing to compare the caller against, and every undo would refuse with:no_actor.
A no-op when the workflow declares neither undo nor any undoable
transition.