fixed various error messages
This commit is contained in:
@ -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?
|
||||
|
Reference in New Issue
Block a user