summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-17 13:36:03 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-17 13:36:03 +0000
commitbd5977d97eaf92f852c1bfe499052b6b07ab8aae (patch)
tree714a9672c2007f78dbe7c2c5a649e24505ae9863 /app/models/principal.rb
parent72a163d8b30978f23059ba2a2083675a38bd5680 (diff)
downloadredmine-bd5977d97eaf92f852c1bfe499052b6b07ab8aae.tar.gz
redmine-bd5977d97eaf92f852c1bfe499052b6b07ab8aae.zip
Support frozen_string_literal in app/**/*.rb (#26561).
Contributed by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@17987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r--app/models/principal.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 1d9c288cb..6e77cd866 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
@@ -71,7 +71,7 @@ class Principal < ActiveRecord::Base
where({})
else
pattern = "%#{q}%"
- sql = "LOWER(#{table_name}.login) LIKE LOWER(:p)"
+ sql = +"LOWER(#{table_name}.login) LIKE LOWER(:p)"
sql << " OR #{table_name}.id IN (SELECT user_id FROM #{EmailAddress.table_name} WHERE LOWER(address) LIKE LOWER(:p))"
params = {:p => pattern}