Skip to content

Commit

Permalink
Improve helper function names to make them more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
greyfiles committed Oct 23, 2022
1 parent 9ef20cf commit 32f8435
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/auth_controller.rb
Expand Up @@ -7,8 +7,8 @@ class AuthController < ApplicationController
verify method: :post, only: %i[login logout],
redirect_to: { action: :list }

before_action :log_logging_in, only: :after_login
before_action :log_logging_out, only: :logout
before_action :log_user_login, only: :after_login
before_action :log_user_logout, only: :logout

def action_allowed?
case params[:action]
Expand Down Expand Up @@ -95,11 +95,11 @@ def login_failed
redirect_to controller: 'password_retrieval', action: 'forgotten'
end

def log_logging_out
def log_user_logout
ExpertizaLogger.info LoggerMessage.new(controller_name, '', 'Logging out!', request)
end

def log_logging_in
def log_user_login
ExpertizaLogger.info LoggerMessage.new('', user.name, 'Login successful')
end

Expand Down

0 comments on commit 32f8435

Please sign in to comment.