Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Redirect back to the last step #6

Closed
rahul100885 opened this Issue · 2 comments

2 participants

@rahul100885

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

@rahul100885

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

@schneems
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.