displays welcome back when test has started

This commit is contained in:
Mark Moser
2016-08-02 18:30:15 -05:00
parent 1a97bb16fa
commit a3eab2b27a
4 changed files with 32 additions and 0 deletions

View File

@ -14,6 +14,7 @@ class ApplicationController < ActionController::Base
def current_candidate
@current_candidate ||= Candidate.find_by(test_hash: session[:test_id]) if session[:test_id]
end
helper_method :current_candidate
private

View File

@ -11,6 +11,7 @@ class CandidateController < ApplicationController
end
def welcome
render :welcome_back if current_candidate.answers.count > 0
end
def saved