Commit 21b52d2f authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Display users then groups on project memberships view (#4389).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3161 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 72ceefd3
......@@ -33,6 +33,11 @@ class Principal < ActiveRecord::Base
}
def <=>(principal)
self.to_s.downcase <=> principal.to_s.downcase
if self.class.name == principal.class.name
self.to_s.downcase <=> principal.to_s.downcase
else
# groups after users
principal.class.name <=> self.class.name
end
end
end
......@@ -214,11 +214,6 @@ class User < Principal
def self.find_by_mail(mail)
find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase])
end
# Sort users by their display names
def <=>(user)
self.to_s.downcase <=> user.to_s.downcase
end
def to_s
name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment