]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from Principal model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 02:19:03 +0000 (02:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 27 Jan 2014 02:19:03 +0000 (02:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12731 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb

index 7aac0123566acc7e84d55e6cb4ba1db58685dfad..302eac5e7b6f4ff8e2dcfd576ef4be0a435a5d3d 100644 (file)
@@ -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