Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 417137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:33:02+00:00 2026-05-12T18:33:02+00:00

I’m writing an app that has a wizard type input section. Think MS Windows

  • 0

I’m writing an app that has a “wizard” type input section. Think MS Windows Installers.

I’m having a hard time figuring out how the most RESTful way to do this with rails. I can make it happen in a non-restful way (already did for version 1 of the app), but I’m trying to be a little more idiomatic this time around.

Here’s the situation. I have a 5 step wizard that has to gather information. Steps 1, 2, and 4 deal with resource A. Step 3 deals with multiples of resource B and must associate them to resource A. Step 5 is just a confirmation.

So I have my resourceA_controller and my resourceB_controller…but they only save/update that one resource. I’m guessing that I should set up a wizard_controller for each of the steps in the process, but I’m not sure how the routing should work.

For example…

WizardController < ApplicationController
  def stepOne
    @resourceA = ResourceA.new
  end
  def stepTwo
    @resourceA = params[:id]
  end
  ...
  def stepFive
  end
end

And then I would have my view be on the StepOne view:

<form action='/resourceA/new'/>

and on the StepTwo action

<form action='/resourceA/12345/edit'/>

etc.

But then my resourceA and resourceB controllers would have to know how to redirect to the appropriate step in the wizard_controller. Tangled mess!

Am I anywhere near the right track? Or is there a rails built-in mechanism or plugin that does this kind of thing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:33:02+00:00Added an answer on May 12, 2026 at 6:33 pm

    It’s important to understand the distinction between what REST provides and what REST doesn’t care about.

    • A RESTful service provides a minimal set of actions which a client can use (providing it knows the correct data format) to manipulate a class of resources

      • For example, you should be able to POST to /resourceA/12345 to edit that existing resource
    • A RESTful service doesn’t make any guarantees about which other URLs will return meaningful responses.

      • One notable example is that REST doesn’t specify that /resourceA/12345/edit will return an HTML form designed for editing that resource. That’s a feature of the HTML application that simply provides a method of performing the POST described above.

      • Extending this theory, it’s perfectly acceptable to have multiple edit forms which all POST to the defined RESTful URL. Since the controller’s edit action will generally use .attributes = ... to mass-assign whatever it’s passed, you can look at the attributes passed in, along with information about which HTML button was used to submit the form, to decide which page the user should see next.

      • It may be scary relying on one controller method to deal with multiple page’s submissions, but with clever validation and selectively overwriting accessors, you can maintain a lot of control over how users access the app.

      • You should also be able to work out that this method doesn’t restrict users to only sending attributes in the order presented in the form. Another RESTful client could in theory POST updates for all attributes associated with a resource, rather than just those presented by one page of your wizard. Assuming your model methods are robust enough everything can be made to Just Work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 222k
  • Answers 222k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If I'm understanding your question right, you're saying you're redirecting… May 13, 2026 at 12:23 am
  • Editorial Team
    Editorial Team added an answer I don't think you can tell an index to remain… May 13, 2026 at 12:23 am
  • Editorial Team
    Editorial Team added an answer You must release the camera at 'surfaceDestroyed' seeing as you… May 13, 2026 at 12:23 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.