From a0ef175ffea45cf929d422909b564e235c43b149 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 3 Oct 2021 19:56:00 +0000 Subject: Fix rubocop offense (#35073). git-svn-id: http://svn.redmine.org/redmine/trunk@21234 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/models/query.rb b/app/models/query.rb index 7588d39b5..bafdd3c2c 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -1442,10 +1442,9 @@ class Query < ActiveRecord::Base suffix = '%' if options[:starts_with] prefix = suffix = '%' if prefix.nil? && suffix.nil? value = queried_class.sanitize_sql_like value - queried_class.sanitize_sql_for_conditions([ - Redmine::Database.like(db_field, '?', :match => options[:match]), - "#{prefix}#{value}#{suffix}" - ]) + queried_class.sanitize_sql_for_conditions( + [Redmine::Database.like(db_field, '?', :match => options[:match]), "#{prefix}#{value}#{suffix}"] + ) end # Adds a filter for the given custom field -- cgit v1.2.3