Module: PeopleHelper

Defined in:
app/helpers/people_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (String) people_names(people)

Returns a formatted list of people

Returns:

  • (String)

    a formatted list of people



23
24
25
# File 'app/helpers/people_helper.rb', line 23

def people_names(people)
  people.collect{ |a| a.full_last_name }.to_sentence(last_word_connector: ' & ')
end

- (Object) people_search_form



12
13
14
# File 'app/helpers/people_helper.rb', line 12

def people_search_form
  render('/people/quick_search_form')
end


16
17
18
19
# File 'app/helpers/people_helper.rb', line 16

def person_link(person)
  return nil if person.nil?
  link_to(person_tag(person), person.metamorphosize)
end

- (Object) person_tag(person)



3
4
5
6
7
8
9
10
# File 'app/helpers/people_helper.rb', line 3

def person_tag(person)
  return nil if person.nil?
  if person.new_record?
    person.bibtex_name 
  else
    person.cached ? person.cached : 'CACHED VALUE NOT BUILT, CONTACT AN ADMIN.'
  end
end