From 2e38f668993a780578fc63c7ca845fafb16c4282 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 1 Jul 2014 16:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=94=A8=E6=88=B7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8C=89=E6=98=B5=E7=A7=B0=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 30d86f5d..2ae3083d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -202,7 +202,8 @@ class User < Principal where(nil) else pattern = "%#{arg.to_s.strip.downcase}%" - where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern) + #where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern) + where(" LOWER(login) LIKE :p ", :p => pattern) end }