Redirect back to the last step #6

Closed
rahul100885 opened this Issue Apr 28, 2012 · 2 comments

Comments

Projects
None yet
2 participants

In my application user has to filled 7 steps for Visit model. But he can choose to exit from any step but if that user is coming back I want to show him what was his last step and redirect him there.

I tried to set a value for step but its not working

Ya got solution..
Override index in controller

def index
redirect_to wizard_path(@visit.last_step.present? ? next_step(@visit.last_step.to_sym) : steps.first)
end

But it would be great if their is any mechanism to do do

Owner

schneems commented Apr 28, 2012

You'll need to store the state somewhere of the last controller action visited somewhere you could pass it into the link where the user is exiting the wizard flow. You could also store it in the session. Looks like you got a good solution above. Thanks for trying out Wicked!

@schneems schneems closed this Apr 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment