Closed zombor closed 11 years ago
Apparently there are specs for this. I'll fix them up.
Thanks for the pull request. I'm curious, have you tried the technique documented here? http://slagyr.github.com/statemachine/example3.html
Was is unsatisfactory?
If you mean using on_entry, we did discuss this option, but we are logging all state changes for objects, and didn't want excess noise related to this. We also considered inspecting the objects before performing the state change, but that violates tell don't ask.
statemachine-2.1.0.gem released.
I have a requirement to abort a transition state change on certain conditions. I've patched the transition file, but didn't see any specs for that specific behavior.
Here's the sample code I'm using:
If the job start date is not in the past, it will not move to the expired state.