Commit 4c656fcf authored by Eric Davis's avatar Eric Davis

Define Principal#name so all subclasses will have some sort of name when printed.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4076 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3a2efb47
......@@ -33,7 +33,11 @@ class Principal < ActiveRecord::Base
}
before_create :set_default_empty_values
def name(formatter = nil)
to_s
end
def <=>(principal)
if self.class.name == principal.class.name
self.to_s.downcase <=> principal.to_s.downcase
......
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