summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-27 02:19:03 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-27 02:19:03 +0000
commitea8febad03a03908b885897dd54e4a4391f51f32 (patch)
tree88d93372b42d6e7b510a67839889dae4404c8fed /app/models/user.rb
parent8832cca13b9987e3af627d9a145f66c9c5c8016b (diff)
downloadredmine-ea8febad03a03908b885897dd54e4a4391f51f32.tar.gz
redmine-ea8febad03a03908b885897dd54e4a4391f51f32.zip
remove unneeded Relation#all from Principal model
git-svn-id: http://svn.redmine.org/redmine/trunk@12731 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 7aac01235..302eac5e7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -387,7 +387,7 @@ class User < Principal
if login.present?
login = login.to_s
# First look for an exact match
- user = where(:login => login).all.detect {|u| u.login == login}
+ user = where(:login => login).detect {|u| u.login == login}
unless user
# Fail over to case-insensitive if none was found
user = where("LOWER(login) = ?", login.downcase).first