gocardless/statesman — pull request #78 by pacso (2014-09-07 23:27:25+00:00)
Title: Event transitions should work with multiple state targets

Currently, triggering an event will only try to `transition_to!` the first allowed state for the `current_state` in the given event.

In the case that two (or more) states are allowed, only the first state transition is ever attempted. If a guard fails on the first transition, an exception is raised and the event fails. This is regardless of whether the second transition would have been successful.

Tests are not complete for this pull request yet - I've just added enough to highlight the example and cover the small code-change I've made. I'll flesh out the test coverage tomorrow.

Any idea why events are currently only capable of transitioning to a single state? In this implementation they offer almost nothing over the `transition_to` methods?