Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to build a wizard

Philipp Baumann asked in Rails

Hi Chris

Something I'd love to see a video on is on how to build a wizard. I find this not that simple and would love to see how you solve these kind of issues, like in an onboarding process (or any other process):

  • How and where to check weather the user has to go through an onboarding wizard (e.g. first time user)
  • How to lock down the application, that the user is forced to complete the wizard
  • Where to manage state (which wizard step is the user on)
  • How to prevent the user from jumping / skipping a necessary step
  • Allowing the user to return a step and come back (but not jump a step ahead)

Philipp

Reply

I like that idea. Honestly for most wizard things, I have used Wicked (https://github.com/zombocom/wicked) just about every time. It controls the steps for you and stores them on the model so it remembers the location and everything.

I'd probably still recommend Wicked, but it'd be great to do a basic walkthrough of how you'd implement this from scratch too.

Reply

Hi Chris, I‘m familiar with the Wicked gem, bit still I didn‘t find it that easy. A screencast would be excellent, I‘m sure this would be a topic that I‘m not the only one being confronted with.

Reply

I second this.

Reply

I third this. All in favor say aye?

Edit: After a lot of “trying to wrangle together” a complex wizard using wicked, I finally gave up and built my own. Pretty happy with the outcome (so far.) would still love to see both with wicked (more complex than scoping to user) and rolling your own.

Reply

+1

Reply

Wicked wizard is great, no doubt. @Chris, where GoRails would be helpful is in doing a wicked + hotwire screencast.

Reply

FWIW. I have since built a SPA type approach for this that works really well, and the data is not stored in session which has it's own benefits.

This said, I think an episode or even a series on this would be great. There are a ton of really interesting ways to do wizards, and there are a ton of reasons why an app would need one.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,969+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.