summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-12 16:49:02 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-12 16:49:02 +0000
commit559b2069ac4427bb4368c0e7627590a6557cac33 (patch)
treea6408171b75ccd0166be6f7ec55983581397a6b6
parent6c5e89ede003e093acd7ef61d295f17b88ee25f0 (diff)
downloadredmine-559b2069ac4427bb4368c0e7627590a6557cac33.tar.gz
redmine-559b2069ac4427bb4368c0e7627590a6557cac33.zip
User#<=> modified to sort on firstname if same lastname
git-svn-id: http://redmine.rubyforge.org/svn/trunk@446 e93f8b46-1217-0410-a6f0-8f06a7374b81
-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 60baa72da..6ae1301e7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -143,7 +143,7 @@ class User < ActiveRecord::Base
end
def <=>(user)
- lastname <=> user.lastname
+ lastname == user.lastname ? firstname <=> user.firstname : lastname <=> user.lastname
end
private