user10756
user10756

Reputation: 649

Rails Step-by-Step object creation

I wonder what's the best way to design an object creation step by step.

For example,

I have a model order and I want too design the order/new such that, by clicling on create new order user goes over the following steps:

  1. fills all user related information, press Continue
  2. fills content product information, press Continue
  3. fills some other information....press Continue

The problem is ut is a difficult design to create, I've never saw the example of such design ni source code, however it's very popular step-by-step creation.

The difficulty is all filled information relates to order and by pressing continue I should to save the info somewhere then open new form, fill the info there and save and at the end create object order.

Do you familiar with the described scenario, and how to implement it in rails.

Upvotes: 2

Views: 182

Answers (2)

Farley Knight
Farley Knight

Reputation: 1793

I would use Wicket.

https://github.com/schneems/wicked/wiki/Building-Partial-Objects-Step-by-Step

What your describing are called Wizard forms:

http://railscasts.com/episodes/346-wizard-forms-with-wicked?view=asciicast

In the tutorial you can manage forms in separate steps:

Step 1

Step 1

Step 2

Step 2

Step 3

Step 3

Upvotes: 4

apneadiving
apneadiving

Reputation: 115541

This is exactly what the wicked gem does.

Here is a Railscast.

Upvotes: 3

Related Questions