Fix RuboCop offenses due to r22343: Style/RedundantRegexpEscape, Layout/EmptyLinesAroundMethodBody, and Style/HashSyntax (#39181).

git-svn-id: https://svn.redmine.org/redmine/trunk@22346 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-10-16 14:17:35 +00:00
parent 28a45b7144
commit 03280712d3
2 changed files with 6 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ class UserQuery < Query
else
# match = (operator == '~')
match = !operator.start_with?('!')
matching_operator = operator.sub /^\!/, ''
matching_operator = operator.sub /^!/, ''
name_sql = %w(login firstname lastname).map{|field| sql_for_field(:name, operator, value, User.table_name, field)}
emails = EmailAddress.table_name
@@ -191,6 +191,5 @@ class UserQuery < Query
op = match ? " OR " : " AND "
"(#{conditions.map{|s| "(#{s})"}.join(op)})"
end
end
end