User ⊆ Principal ∧ Principal ⊄ User

I.e. calling Member#principal will always work.
On the other hand calling #user will fail if
the member is a group.
pull/3480/head
Markus Kahl 9 years ago
parent f7d28dab95
commit df36876d21
  1. 2
      app/models/member.rb

@ -46,7 +46,7 @@ class Member < ActiveRecord::Base
after_destroy :unwatch_from_permission_change after_destroy :unwatch_from_permission_change
def name def name
user.name principal.name
end end
def to_s def to_s

Loading…
Cancel
Save