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

30 lines
516 B
Ruby
Raw Normal View History

2016-07-27 22:16:12 -05:00
class CandidateController < ApplicationController
def welcome
end
def question
2016-07-27 22:53:14 -05:00
@question = Question.order("RAND()").first # .where(input_type: 'live-coder')
2016-07-27 22:16:12 -05:00
@status = QuizStatus.new(Candidate.order("RAND()").first)
@answer = @question.answers.order("RAND()").first
end
2016-07-28 08:47:34 -05:00
def update_question
redirect_to saved_path if params[:submit] == 'Save'
redirect_to :question
end
2016-07-27 22:16:12 -05:00
def summary
end
def thankyou
end
def saved
end
2016-07-28 08:47:34 -05:00
def validate
redirect_to :question
end
2016-07-27 22:16:12 -05:00
end