skill-assessment-app/app/controllers/application_controller.rb

8 lines
203 B
Ruby
Raw Normal View History

2016-07-26 11:59:23 -05:00
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
2016-07-29 11:53:01 -05:00
def current_candidate
@current_candidate ||= Candidate.find_by(test_hash: session[:test_id])
end
2016-07-26 11:59:23 -05:00
end