User#<=> modified to sort on firstname if same lastname

git-svn-id: http://redmine.rubyforge.org/svn/trunk@446 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-04-12 16:49:02 +00:00
parent 6c5e89ede0
commit 559b2069ac
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class User < ActiveRecord::Base
end end
def <=>(user) def <=>(user)
lastname <=> user.lastname lastname == user.lastname ? firstname <=> user.firstname : lastname <=> user.lastname
end end
private private