Submit summary

This commit is contained in:
Derek Montgomery
2016-08-02 16:27:27 -05:00
parent 988f1346c1
commit 7bdb86f89f
6 changed files with 135 additions and 14 deletions

View File

@ -33,6 +33,17 @@ class Candidate < ApplicationRecord
"--"
end
def complete!
if update_attributes(completed: true)
CandidateMailer.submitted(self).deliver_now
RecruiterMailer.candidate_submitted(self).deliver_now
ReviewerMailer.candidate_submission(self).deliver_now
return true
end
false
end
private
def generate_test_hash