Module: JobsHelper

Defined in:
app/helpers/jobs_helper.rb

Instance Method Summary collapse

Instance Method Details

#job_person_names(job_persons) ⇒ Object


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

def job_person_names(job_persons)
  names = ""
  job_persons.each do |person|
    names << "<a href='/people/#{person.twiki_name}' target='_top'>#{person.human_name}</a>, "
  end
  names = names[0..-3]
end

#job_title_formatted(job) ⇒ Object


11
12
13
14
15
16
17
# File 'app/helpers/jobs_helper.rb', line 11

def job_title_formatted(job)
  if job.is_accepting
    job.title
  else
    return "<strike>#{job.title}</strike>"
  end
end

#job_titles_formatted(jobs) ⇒ Object


19
20
21
22
23
24
25
# File 'app/helpers/jobs_helper.rb', line 19

def job_titles_formatted(jobs)
  job_titles = ""
  jobs.each do |job|
    job_titles << "<a href='/jobs/#{job.id}/edit' target='_top'>#{job.title}</a>, "
  end
  job_titles = job_titles[0..-3]
end