Changeset [6a924d6b1f5afc6349fd8507cc3e59b752113eab] by Dathan Bennett
Revision 6a924d6b1f5afc6349fd8507cc3e59b752113eab,
committed by Dathan Bennett
· October 12th, 2016 @ 04:25 PM
Allow multiple transitions in a single event with the same to and from states
As reported in https://github.com/aasm/aasm/issues/372
and https://github.com/aasm/aasm/issues/362,
if two transitions in the same event have the same to
and from states but differ in their
guards, if any transition is valid, the first transition is the one
that's always executed.
This attempts to resolve that issue.
https://github.com/aasm/aasm/commit/6a924d6b1f5afc6349fd8507cc3e59b...
3 changed files
-
A
spec/models/multiple_transitions_that_differ_only_by_guard.rb -
A
spec/unit/multiple_transitions_that_differ_only_by_guard_spec.rb -
M
lib/aasm/core/event.rb