From e6a7f17874e0c7863a66640328be68a9bf336e45 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 19 Nov 2023 12:46:17 +0100 Subject: [PATCH] fix brakman offense --- lib/additionals/entity_methods_global.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/additionals/entity_methods_global.rb b/lib/additionals/entity_methods_global.rb index b1629175..3a6397b4 100644 --- a/lib/additionals/entity_methods_global.rb +++ b/lib/additionals/entity_methods_global.rb @@ -80,7 +80,7 @@ def like_pattern(value, wildcard = nil) def like_with_wildcard(columns:, value:, wildcard: :none) sql = [] Array(columns).each do |column| - sql << "LOWER(#{column}) LIKE LOWER(:p) ESCAPE :s" + sql << "LOWER(#{connection.quote_column_name column}) LIKE LOWER(:p) ESCAPE :s" end sql_string = sql.join ' OR '