comment creation

This commit is contained in:
Mark Moser
2017-02-13 15:54:57 -06:00
parent 567b4a409d
commit da5dc4bd94
5 changed files with 50 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<%= render partial: 'shared/form_model_errors', locals: { obj: @comment } %>
<%= form_for @comment, url: "#", method: :post do |form| %>
<%= form_for @comment, url: admin_create_comment_path(test_hash), method: :post do |form| %>
<div class="form-group">
<%= form.label :message, "Comment" %>
<%= form.text_area :message %>

View File

@ -45,7 +45,7 @@
<div class="review-comments">
<h2 class="prft-heading">Comments</h2>
<%= render partial: 'comment', collection: @comments %>
<div><%= render partial: 'comment_form' %></div>
<%= render partial: 'comment', collection: @comments, locals: { test_hash: @candidate.test_hash } %>
<div><%= render partial: 'comment_form', locals: { test_hash: @candidate.test_hash } %></div>
</div>
</div>