fixed bug in candidate edit form
This commit is contained in:
1 parent
5ac9b530fe
commit
37e628e27b
3 files changed
+4
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
<%= render partial: 'shared/form_model_errors', locals: { obj: candidate } %>
|
<%= render partial: 'shared/form_model_errors', locals: { obj: candidate } %>
|
||||||
|
|
||||||
<%= form_for candidate, url: create_candidate_path do |form| %>
|
<%= form_for candidate, url: action, method: :post do |form| %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= form.label :name, "Candidate name" %>
|
<%= form.label :name, "Candidate name" %>
|
||||||
<%= form.text_field :name %>
|
<%= form.text_field :name %>
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<h1>Edit: <%= @candidate.name %></h1>
|
<h1>Edit: <%= @candidate.name %></h1>
|
||||||
<p><strong>Test ID: </strong><%= @candidate.test_hash %></p>
|
<p><strong>Test ID: </strong><%= @candidate.test_hash %></p>
|
||||||
|
|
||||||
<%= render partial: 'form', locals: { candidate: @candidate, quizzes: @quizzes } %>
|
<%= render partial: 'form', locals: { action: update_candidate_path(@candidate.id), candidate: @candidate, quizzes: @quizzes } %>
|
||||||
</main>
|
</main>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<main class="intro_tpl">
|
<main class="intro_tpl">
|
||||||
<h1>New Candidate</h1>
|
<h1>New Candidate</h1>
|
||||||
|
|
||||||
<%= render partial: 'form', locals: { candidate: @candidate, quizzes: @quizzes } %>
|
<%= render partial: 'form', locals:
|
||||||
|
{ action: create_candidate_path, candidate: @candidate, quizzes: @quizzes } %>
|
||||||
</main>
|
</main>
|
||||||
Reference in new issue
Block a user