fixed various error messages

This commit is contained in:
Mark Moser
2016-08-01 16:43:05 -05:00
parent df6175ce86
commit 4a20c579ed
4 changed files with 12 additions and 6 deletions

View File

@ -45,7 +45,7 @@ class CandidateController < ApplicationController
def validate
candidate = Candidate.find_by(test_hash: params['test_id'])
redirect_to(root_path, alert: "Sorry, incorrect test id") and return if candidate.nil?
redirect_to(root_path, flash: { error: "Sorry, incorrect test id" }) and return if candidate.nil?
session[:test_id] = candidate.test_hash
redirect_to :thankyou and return if candidate.completed?