-
Notifications
You must be signed in to change notification settings - Fork 37
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
Is there a way for the event methods to skip validations? #33
Comments
Interesting idea. I’ve never thought of that, but suggestions with implementations are welcome! |
Sorry, just closed the issue by accident, but I’ll leave this opened until someone actually implements this. |
Not exactly what you're trying to achive @terenceponce, but I prevent records from transitioning to an invalid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want any state changes to exclusively go through the state machine and prevent other developers, including myself, to change the state directly via
#create
or#update
. Here's an example:As you can see, the validations make sure that the following code won't work:
Unfortunately, the event methods provided by
stateful_enum
won't work because it will have to go through the same validations. Is there a way for me to skip these validations when the state change comes fromstateful_enum
?The text was updated successfully, but these errors were encountered: