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

@ -37,14 +37,13 @@ class CandidateController < ApplicationController
redirect_to :question and return unless prep_status.current_question_id.nil?
end
# TODO
def update_summary
# redirect_to :summary
# only after successful submission
CandidateMailer.submitted(current_candidate).deliver_now
RecruiterMailer.candidate_submitted(current_candidate).deliver_now
ReviewerMailer.candidate_submission(current_candidate).deliver_now
prep_status
not_completed_error = 'You must complete all questions to submit your test.'
record_error = 'There was a problem with your submission. Please try again later.'
redirect_to :summary, flash: { error: not_completed_error } and return unless @status.can_submit
redirect_to :thankyou and return if current_candidate.complete!
redirect_to :summary, flash: { error: record_error }
end
def validate