Aaron Pfeifer from PluginAWeek has released a pretty decent state machine today. It's got plenty of neat features like before- and after-transition hooks, state machine namespacing and the ability to add multiple state machines to a single class, integration with ActiveRecord, DataMapper and Sequel, the possibility to add validations to your model in certain states and, last but not least, an automated GraphViz visualization generator, which will give you a nice little drawing of your state machine.
I will definetely check this out next time I need a state machine.
blog comments powered by Disqus