diff options
author | Go MAEDA <maeda@farend.jp> | 2022-12-25 07:55:14 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-12-25 07:55:14 +0000 |
commit | cec30f9a05e2b5def4db6660043e34641a77dff7 (patch) | |
tree | 6fa4bb84288662580c8a711a0b72f98fc9dce680 /app/controllers | |
parent | bf9585ac42218e7bf01fa3b57c4ff59ca1221500 (diff) | |
download | redmine-cec30f9a05e2b5def4db6660043e34641a77dff7.tar.gz redmine-cec30f9a05e2b5def4db6660043e34641a77dff7.zip |
Fix RuboCop offense Performance/StringInclude in app/controllers/imports_controller.rb (#37247).
git-svn-id: https://svn.redmine.org/redmine/trunk@21999 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/imports_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index acb41999f..eb4b330bb 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -58,7 +58,7 @@ class ImportsController < ApplicationController end rescue CSV::MalformedCSVError, EncodingError => e - if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/ + if e.is_a?(CSV::MalformedCSVError) && !e.message.include?('Invalid byte sequence') flash.now[:error] = l(:error_invalid_csv_file_or_settings, e.message) else flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding'])) |