Return a boolean in OrderWorkflow#advance_to_state

Returns true if advancing was successful, which is helpful in control flows that use the method in a conditional
This commit is contained in:
Matt-Yorkley
2021-08-10 19:01:00 +01:00
parent 4d77d4df77
commit e91a8d603f

View File

@@ -44,6 +44,8 @@ class OrderWorkflow
after_transition_hook(options)
end
order.state == target_state
end
def advance_order!(options)