From ca26821c6caeefa5c877a93ea62548b3c493e77e Mon Sep 17 00:00:00 2001 From: Tom de Bruijn Date: Sat, 20 May 2023 15:05:48 +0200 Subject: [PATCH] Fix comment form partial in commenting guide The idea is the parent resource it should be linked to. The comment object is created in the form itself. --- _pages/commenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pages/commenting.md b/_pages/commenting.md index b1fd99d7..a8e3d821 100644 --- a/_pages/commenting.md +++ b/_pages/commenting.md @@ -170,7 +170,7 @@ Open `app/views/ideas/show.html.erb` and at the very bottom add these lines: <% end %>

Add a new comment

-<%= 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.