removed unreachable code

This commit is contained in:
Mark Moser 2016-09-14 17:29:09 -05:00
parent 27ef8565f3
commit 54c6202b62

View File

@ -27,8 +27,9 @@ class QuizController < ApplicationController
def submit_summary
not_completed_error = 'You must complete all questions to submit your test.'
redirect_to :summary, flash: { error: not_completed_error } and return unless prep_status.can_submit
redirect_to :thankyou and return if complete_and_email
redirect_to :summary, flash: { error: 'Sorry, there was a problem. Please try again.' }
complete_and_email
redirect_to :thankyou
end
private