From a397141d78b073246059b36489eb28f27485f9f8 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 18 Sep 2024 04:05:25 -0400 Subject: [PATCH] Move non-action public method controller callback to private methods (#31933) --- app/controllers/auth/sessions_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb index a2fed644fe7..ecac4c5ba8e 100644 --- a/app/controllers/auth/sessions_controller.rb +++ b/app/controllers/auth/sessions_controller.rb @@ -20,11 +20,6 @@ class Auth::SessionsController < Devise::SessionsController p.form_action(false) end - def check_suspicious! - user = find_user - @login_is_suspicious = suspicious_sign_in?(user) unless user.nil? - end - def create super do |resource| # We only need to call this if this hasn't already been @@ -101,6 +96,11 @@ class Auth::SessionsController < Devise::SessionsController private + def check_suspicious! + user = find_user + @login_is_suspicious = suspicious_sign_in?(user) unless user.nil? + end + def home_paths(resource) paths = [about_path, '/explore']