removed hard coded emails for reviewer submission

This commit is contained in:
Mark Moser 2016-09-15 15:09:47 -05:00
parent 3f77a00870
commit 3bd9d3364c
2 changed files with 7 additions and 1 deletions

View File

@ -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?

View File

@ -18,7 +18,11 @@
<%= form.select :experience, experience_options(@candidate.experience), include_blank: false %>
</div>
<%= form.hidden_field :quiz_id, { value: Quiz.first.to_i } %>
<div class="form-group">
<%= form.label :quiz_id, "Quiz" %>
<%= form.select :quiz_id, options_from_collection_for_select(@quizzes, 'id', 'name'), include_blank: (@quizzes.size > 1) %>
</div>
<%= submit_tag "Create" %>
<% end %>
</main>