diff options
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r-- | app/models/principal.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb index 77f599c73..0a6c32ba2 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -35,6 +35,8 @@ class Principal < ApplicationRecord :foreign_key => 'user_id' has_many :projects, :through => :memberships has_many :issue_categories, :foreign_key => 'assigned_to_id', :dependent => :nullify + # Always returns nil for groups + has_one :email_address, lambda {where :is_default => true}, :autosave => true, :foreign_key => 'user_id' validate :validate_status @@ -128,6 +130,11 @@ class Principal < ApplicationRecord to_s end + # Returns nil by default, subclasses should implement this method + def initials(formatter = nil) + nil + end + def mail=(*args) nil end |