From 559b2069ac4427bb4368c0e7627590a6557cac33 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 12 Apr 2007 16:49:02 +0000 Subject: [PATCH] User#<=> modified to sort on firstname if same lastname git-svn-id: http://redmine.rubyforge.org/svn/trunk@446 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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