This is my first post so if you could not crucify me publicly I would
I beleive I have a simple question but do not manage to find the answer.
Basically I want to create a wizard type of system where the customer
enters some info on the first page then goes to step 2, some more
info, then step 3 and finishes. Each steps represent an action in the
same controller. I have declared an instance variable (@step1) in the
first step and needs it in the last finishing step.
If I try to use that variable, it gives me a null pointer exception.
The lifespan of a instance variable is between the controller and the
view and dies thereafter? Can it be for the entire lifespan of the
More concrete exemple:
--- step 1 ---
name , address ect... + internal info set within the action
--- step 2 ---
depends on info entered in step 1 +
-- step 3 ---
depends on step2 + favorite dog
-- step 4 --
finishes -> saves into the db === > name, address, internal info set
by action "step1" + favorite cat + favorite dog
How can in action "step4" access the data set internaly un "step1"
plus the data entered by the client in the further 3 actions?
Hope it is clear engough. I heard of acts_as_wizard but beleive this
situation do not require a plugin - good for my learning curve as