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:
parent
6c5e89ede0
commit
559b2069ac
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue