From 7f59206944193591d7aef5cbd73edc7f5303add7 Mon Sep 17 00:00:00 2001 From: Shuhei Kitagawa Date: Thu, 21 Jun 2018 10:41:49 +0900 Subject: Replace bypass option with bypass_sign_in (#7867) --- app/controllers/auth/confirmations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/auth') diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index a240425cd..068e71cad 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -10,7 +10,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController return unless request.patch? && params[:user] if @user.update(user_params) @user.skip_reconfirmation! - sign_in(@user, bypass: true) + bypass_sign_in(@user) redirect_to root_path, notice: I18n.t('devise.confirmations.send_instructions') else @show_errors = true -- cgit From 0c3a337e045dbd4b7be6ae6c3f07969b42f08857 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Thu, 21 Jun 2018 23:48:54 +0200 Subject: Fix confirmations_controller --- app/controllers/auth/confirmations_controller.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/controllers/auth') diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index 322f8683e..de0fcd3e3 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -6,12 +6,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController before_action :set_user, only: [:finish_signup] before_action :set_pack - private - - def set_pack - use_pack 'auth' - end - # GET/PATCH /users/:id/finish_signup def finish_signup return unless request.patch? && params[:user] @@ -26,6 +20,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController private + def set_pack + use_pack 'auth' + end + def set_user @user = current_user end -- cgit