Skip to content

Commit

Permalink
Fix comment form partial in commenting guide
Browse files Browse the repository at this point in the history
The idea is the parent resource it should be linked to. The comment
object is created in the form itself.
  • Loading branch information
tombruijn committed May 20, 2023
1 parent 172c66a commit ca26821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _pages/commenting.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Open `app/views/ideas/show.html.erb` and at the very bottom add these lines:
<% end %>

<h2>Add a new comment</h2>
<%= render partial: "comments/form", locals: { comment: @comment } %>
<%= render partial: "comments/form", locals: { idea: @idea } %>
{% endhighlight %}

This code will show the comments, but first we'll need a way to create comments. For that the last two lines render a comment submission form, which we'll create next.
Expand Down

0 comments on commit ca26821

Please sign in to comment.