HomeRamblings  ⁄  mvc

mvc

A model-free wizard

Maybe I’m taking the whole MVC thing too far, but I’ve been reading and learning both Ruby and Rails at a fairly fast clip and just when I thought I was getting the hang of what goes in models, views, and controllers respectively, along comes The Advanced Recipe for Rails book with a recipe for implementing a wizard that threw me for a loop here. This implementation just so happens to be based off acts_as_state_machine, which plugs into your model classes. And of course, the acts_as_wizard plugin wasn’t too far behind! Well, asking myself whether the wizard logic should be allowed to bleed over into the model prompted me to see just how hard it was to build a wizard in a web interface anyhow (this is my first attempt at a multi-step workflow bit on the web). Most of… read more