From 03280712d3969b8e2de5119752c9b770c0f6f95c Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 16 Oct 2023 14:17:35 +0000 Subject: 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 --- app/models/user_query.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/models') diff --git a/app/models/user_query.rb b/app/models/user_query.rb index dbbb0eccb..cd3a5172b 100644 --- a/app/models/user_query.rb +++ b/app/models/user_query.rb @@ -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 -- cgit v1.2.3