From 5c7d43d36a0ef29c97ed2054b65ed0f7462a24d8 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 3 Oct 2021 19:46:53 +0000 Subject: Replace send with direct call because sanitize_sql_for_conditions is now public (#35073). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@21233 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/query.rb b/app/models/query.rb index b1a98b77d..7588d39b5 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -1442,9 +1442,10 @@ 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.send( - :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