Class: Source::Human

Inherits:
Source
  • Object
show all
Defined in:
app/models/source/human.rb

Instance Method Summary collapse

Methods included from Housekeeping::Users

#alive?, #set_created_by_id, #set_updated_by_id

Instance Method Details

#authority_nameObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/models/source/human.rb', line 10

def authority_name
  # TODO need to use full last name with suffix not just last_name
  case  self.people.count
    when 0
      return ('')  # is this even a valid case?
     when 1
      return (people[0].last_name)
    else
      p_array = Array.new
      for i in 0..(self.people.count-1) do
        p_array.push(self.people[i].last_name)
      end
      p_array.to_sentence(:last_word_connector =>' & ')
  end
end