summaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-03-25 01:32:23 +0000
committerGo MAEDA <maeda@farend.jp>2023-03-25 01:32:23 +0000
commit32d2b1c42f76c07e13bcf748b2071a29cf350606 (patch)
treea178f5208bdb7f5e9a43dca6cdbc5ac144b59459 /app/controllers/application_controller.rb
parentf27de353381a45427b6e38b87c973902de92484f (diff)
downloadredmine-32d2b1c42f76c07e13bcf748b2071a29cf350606.tar.gz
redmine-32d2b1c42f76c07e13bcf748b2071a29cf350606.zip
Fix RuboCop offense Style/InverseMethods: Use `present?` instead of inverting `blank?` (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@22152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index c39fe8ad1..e83e08989 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -251,7 +251,7 @@ class ApplicationController < ActionController::Base
end
if lang.nil? && !Setting.force_default_language_for_anonymous? && request.env['HTTP_ACCEPT_LANGUAGE']
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first
- if !accept_lang.blank?
+ if accept_lang.present?
accept_lang = accept_lang.downcase
lang = find_language(accept_lang) || find_language(accept_lang.split('-').first)
end