skill-assessment-app/app/controllers/candidate_controller.rb
2016-07-28 08:47:34 -05:00

30 lines
516 B
Ruby

class CandidateController < ApplicationController
def welcome
end
def question
@question = Question.order("RAND()").first # .where(input_type: 'live-coder')
@status = QuizStatus.new(Candidate.order("RAND()").first)
@answer = @question.answers.order("RAND()").first
end
def update_question
redirect_to saved_path if params[:submit] == 'Save'
redirect_to :question
end
def summary
end
def thankyou
end
def saved
end
def validate
redirect_to :question
end
end