diff --git a/app/controllers/recruiter_controller.rb b/app/controllers/recruiter_controller.rb index 4b6731e..8ca72cc 100644 --- a/app/controllers/recruiter_controller.rb +++ b/app/controllers/recruiter_controller.rb @@ -8,10 +8,12 @@ class RecruiterController < ApplicationController def new @candidate = Candidate.new + @quizzes = Quiz.order(:name) render :form end def create + @quizzes = Quiz.order(:name) @candidate = Candidate.create(candidate_params.merge(recruiter_id: current_recruiter.id)) if @candidate.persisted? diff --git a/app/views/recruiter/form.html.erb b/app/views/recruiter/form.html.erb index 1a71a96..386de96 100644 --- a/app/views/recruiter/form.html.erb +++ b/app/views/recruiter/form.html.erb @@ -18,7 +18,11 @@ <%= form.select :experience, experience_options(@candidate.experience), include_blank: false %> - <%= form.hidden_field :quiz_id, { value: Quiz.first.to_i } %> +