-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aasm.from_state
is not always populated
#803
Comments
steamwings
changed the title
aasm.from_state is not always populated
Dec 16, 2022
aasm.from_state
is not always populated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
aasm.from_state
is empty for callbacks when the transition does not definefrom
states. Not specifying from states is very useful when the state should be immediately reachable from any other state.To Reproduce
Steps to reproduce the behavior:
Here's a small (untested) example that should get the idea across. The important thing is to include a transition with no from (transitions from any state) and a callback that will use
aasm.from_state
in response to that transition.Expected behavior
aasm.to_state
is populated in all cases, butaasm.from_state
is not populated for events like:coffee
and:party
in the above example.The text was updated successfully, but these errors were encountered: