From 196df264467c2332fbeed1ff350ef176e92d0fd6 Mon Sep 17 00:00:00 2001 From: Brett Walker Date: Tue, 24 Oct 2017 09:23:35 +0300 Subject: [PATCH] fix to pass static-analysis --- app/controllers/confirmations_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index 43b5d557429..8ca01a6e2c6 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -10,12 +10,12 @@ class ConfirmationsController < Devise::ConfirmationsController users_almost_there_path end - def after_confirmation_path_for(_resource_name, resource) + def after_confirmation_path_for(resource_name, resource) # incoming resource can either be a :user or an :email if signed_in?(:user) after_sign_in(resource) else - username = (_resource_name == :email ? resource.user.username : resource.username) + username = (resource_name == :email ? resource.user.username : resource.username) Gitlab::AppLogger.info("Email Confirmed: username=#{username} email=#{resource.email} ip=#{request.remote_ip}") flash[:notice] += " Please sign in." new_session_path(:user) -- GitLab