Hi! Thanks for your plugin.
How can I edit an existing resource on a specific stage? Imagine I have the stages :stage1, :stage2, :stage3. I fill all the stages and the object is created. I then want to re-edit on :stage2. Is it possible?
Easiest is to create a :stage4, and save the model instance in :stage3:
Otherwise, you'll have to set up some routing. Try the following.
@model_name.finished = true
@model_name.save #or save_without_validation
In this method, you'll have to add a field to detect that :stage3 has been completed, I called it 'finished' and used a boolean defaulting to false. The 'do_not_complete' method tells the wizard to maintain its knowledge of the current model when the user presses finish, this allows you to re-enter :stage2 and work on the same model instance. We call 'complete_wizard' here if this is the second time through.
Let me know what works.
Would there be a way to edit an existing resource without depending on an existing session? say a user decides to complete the form from another computer, thus creating a new session, and I give him a login owning the resource - is there a way to pass this resource to the wizardly controller?