deliver_later for controller actions.
This commit is contained in:
@ -40,19 +40,6 @@ class Candidate < ApplicationRecord
|
||||
"#{my_status.progress}%"
|
||||
end
|
||||
|
||||
# FIXME: This feels wrong here. Mail deliveries should be in controller.
|
||||
# Privatize in QuizController
|
||||
# also, bang methods in ruby do an action and replace, or return nil
|
||||
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
|
||||
|
Reference in New Issue
Block a user