Skip to content

Commit

Permalink
Fix route for destroy comment link
Browse files Browse the repository at this point in the history
The route is nested under the idea resource so the path should reflect
that.
  • Loading branch information
tombruijn committed May 20, 2023
1 parent ca26821 commit 616d83a
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 @@ -162,7 +162,7 @@ Open `app/views/ideas/show.html.erb` and at the very bottom add these lines:
<div>
<p><strong><%= comment.user_name %></strong></p>
<p><%= comment.body %></p>
<%= 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?" } } %>
</div>
<% end %>
<% else %>
Expand Down

0 comments on commit 616d83a

Please sign in to comment.