2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-08-02 11:30:03 -05:00
|
|
|
class ReviewerMailer < ApplicationMailer
|
|
|
|
def candidate_submission candidate
|
|
|
|
@candidate = candidate
|
2016-09-15 13:40:43 -05:00
|
|
|
recipients = candidate.quiz.reviewers.map(&:email)
|
2016-08-02 11:30:03 -05:00
|
|
|
|
2016-11-16 18:47:15 -06:00
|
|
|
mail to: recipients, subject: "Skills Assessment Results - #{@candidate.test_hash}"
|
2016-08-02 11:30:03 -05:00
|
|
|
end
|
2017-02-08 17:57:25 -06:00
|
|
|
|
|
|
|
def reminder reminder
|
|
|
|
@reminder = reminder
|
|
|
|
|
|
|
|
mail to: reminder.email, subject: "Review Reminder"
|
|
|
|
end
|
2017-02-09 15:38:38 -06:00
|
|
|
|
|
|
|
def notify_manager candidate_id
|
|
|
|
@candidate = Candidate.find_by(id: candidate_id)
|
|
|
|
@manager = @candidate.manager
|
|
|
|
|
|
|
|
mail to: @manager.email, subject: "Voting Complete"
|
|
|
|
end
|
2017-02-14 11:32:39 -06:00
|
|
|
|
|
|
|
def new_comment comment
|
|
|
|
@comment = comment
|
|
|
|
recipients = comment.candidate.reviewers.map(&:email)
|
|
|
|
|
|
|
|
mail to: recipients, subject: "Skills Assessment Review Comment - #{@comment.test_hash}"
|
|
|
|
end
|
2016-08-02 11:30:03 -05:00
|
|
|
end
|