diff --git a/assets/javascripts/wizard-custom-guest.js b/assets/javascripts/wizard-custom-guest.js index 38a526d5..dc2f6430 100644 --- a/assets/javascripts/wizard-custom-guest.js +++ b/assets/javascripts/wizard-custom-guest.js @@ -1,3 +1,4 @@ -(function() { - window.location.href = "/login"; -})(); +(function () { + document.cookie = 'destination_url=' + window.location.href + ';path=/'; + window.location.href = '/login' +})() diff --git a/controllers/wizard.rb b/controllers/wizard.rb index 2d384530..e2d5656f 100644 --- a/controllers/wizard.rb +++ b/controllers/wizard.rb @@ -4,12 +4,6 @@ class CustomWizard::WizardController < ::ApplicationController helper_method :wizard_page_title helper_method :theme_ids - - before_action :handle_login_redirect, unless: :current_user - - def handle_login_redirect - cookies[:destination_url] = "/w/#{params[:wizard_id]}" - end def wizard CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))