Which State Machine?

A few years back I used AASM. More recently, I just build state functionally by hand on an as needed basis. So I check out rubygems.org and low-and-behold there are many offerings.

Here is a sampling: http://rubygems.org/gems/state_machine http://rubygems.org/gems/aasm http://rubygems.org/gems/acts_as_state_machine http://rubygems.org/gems/statemachine or all of them: http://rubygems.org/search?utf8=✓&query=state+machine

My question is… which one is considered the current “standard” in state machine gems for rails 3?

Don’t forget the ruote work flow engine

compose-unknown-contact.jpg

You can try aasm or transitions.

compose-unknown-contact.jpg

I'm not sure if we can say that there are any standards at all. You should just check what fits for your needs best: transitions declaration, callbacks, state checking interfaces etc. Last time I was implementing state machine I chose AASM after trying several other also just cos it fit to my needs best. Just try to test at least a couple of gems it doesn't actually take a lot of time, but you'll make your own opinion.