From 616d83aabab5c52f2575d35b450fa1bdb2b47e63 Mon Sep 17 00:00:00 2001 From: Tom de Bruijn Date: Sat, 20 May 2023 15:08:29 +0200 Subject: [PATCH] Fix route for destroy comment link The route is nested under the idea resource so the path should reflect that. --- _pages/commenting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pages/commenting.md b/_pages/commenting.md index a8e3d821..c788c998 100644 --- a/_pages/commenting.md +++ b/_pages/commenting.md @@ -162,7 +162,7 @@ Open `app/views/ideas/show.html.erb` and at the very bottom add these lines:

<%= comment.user_name %>

<%= comment.body %>

- <%= button_to "Destroy this comment", comment_path(comment), method: :delete, class: "btn btn-danger", form: { data: { turbo_confirm: "Are you sure?" } } %> + <%= button_to "Destroy this comment", idea_comment_path(@idea, comment), method: :delete, class: "btn btn-danger", form: { data: { turbo_confirm: "Are you sure?" } } %>
<% end %> <% else %>