You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 from stateful_enum?
The text was updated successfully, but these errors were encountered:
Not exactly what you're trying to achive @terenceponce, but I prevent records from transitioning to an invalid state through #create or #update methods in this PR #49
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: