19 lines
484 B
Plaintext
19 lines
484 B
Plaintext
<h1><%= @article.title %></h1>
|
|
|
|
<p><%= @article.body %></p>
|
|
|
|
<% 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 %>
|
|
|
|
<h2>Add a comment</h2>
|
|
<%= render "comments/form" %> |