[Patch] Define state actions as method array
-
Nathaniel Bibler
- Tag set to callbacks, feature, patch
Here's a patch that I think resolves your problem. Pretty simple, actually ...
-
Nathaniel Bibler
Actually, here's a better patch that supports multiple callbacks for all areas (except guards).
I created a separate Callbacks module which contains the execution logic for the callbacks. This should work out better in the long run for maintainability, vs just repeating the same code in three different files.
I didn't mess with the guard logic, because it could be a bit of a gray area. My thought would be if any of the given calls return false, then the guard fails, but ... that's not for me to decide. :)
-
Nathaniel Bibler
- Title changed from Define state actions as method array to [Patch] Define state actions as method array
-
Travis Tilley
you can now pass in an array for event actions, state actions, and transition actions. so this is resolved in the latest AASM.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
