ecto_state_machine
ecto_state_machine copied to clipboard
Feature: Validate change without needing an event
We came into a case where we needed to do state transitions on our Ecto models, but the new state would be received from user input (e.g an API call)
So instead of using a large conditional, and then using the can_x? / event functions to change state, we put together a simple ecto validation to check that the transition was a valid one.
It would be great if this could be considered for inclusion in the main repo - any feedback is welcome!
Thanks! Joff
@asiniy Hi! Sorry this has taken a while!
I think we have a more comprehensive set of tests now - let me know if there's anything else you need :-)