yooo this is sick

This commit is contained in:
2024-08-08 11:19:44 +02:00
parent ffc09cabc4
commit aa0811e25d
22 changed files with 226 additions and 33 deletions

View File

@@ -2,13 +2,15 @@
<p><%= @article.body %></p>
<ul>
<li><%= link_to "Edit", edit_article_path(@article) %></li>
<li><%= link_to "Destroy", article_path(@article), data: {
turbo_method: :delete,
turbo_confirm: "Are you sure?"
} %></li>
</ul>
<% if logged_in? && @article.user_id == current_user.id %>
<ul>
<li><%= link_to "Edit", edit_article_path(@article) %></li>
<li><%= link_to "Destroy", article_path(@article), data: {
turbo_method: :delete,
turbo_confirm: "Are you sure?"
} %></li>
</ul>
<% end %>
<h2>Comments</h2>
<%= render @article.comments %>