Module: Person

Included in:
Admin, User
Defined in:
app/models/person.rb

Instance Method Summary collapse

Instance Method Details

#display_nameObject



3
4
5
6
7
8
9
10
11
12
# File 'app/models/person.rb', line 3

def display_name
  admin_name = ''
  admin_name << self.first_name + ' ' if self.first_name
  admin_name << self.last_name  if self.last_name
  if admin_name == ''
    self.email
  else
    admin_name
  end
end