From bfa190e98b7c64f089d49733ee4ee984c4aebf78 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Fri, 13 Aug 2021 02:55:25 +0530 Subject: [PATCH] Revert "FIX: reset step progress on wizard skip" This reverts commit 0d2f3d1cb52b917fc4c3cd838cfa295e883decff. --- controllers/custom_wizard/wizard.rb | 1 - lib/custom_wizard/wizard.rb | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/controllers/custom_wizard/wizard.rb b/controllers/custom_wizard/wizard.rb index 1f259a59..539b4b80 100644 --- a/controllers/custom_wizard/wizard.rb +++ b/controllers/custom_wizard/wizard.rb @@ -69,7 +69,6 @@ class CustomWizard::WizardController < ::ApplicationController end submission.remove if submission.present? - wizard.cleanup! end render json: result diff --git a/lib/custom_wizard/wizard.rb b/lib/custom_wizard/wizard.rb index b4b3b8fd..8f5a897f 100644 --- a/lib/custom_wizard/wizard.rb +++ b/lib/custom_wizard/wizard.rb @@ -286,15 +286,11 @@ class CustomWizard::Wizard end end - def cleanup! + def final_cleanup! if id == user.custom_fields['redirect_to_wizard'] user.custom_fields.delete('redirect_to_wizard') user.save_custom_fields(true) end - end - - def final_cleanup! - cleanup! if current_submission.present? current_submission.submitted_at = Time.now.iso8601