Add comments'
This commit is contained in:
@@ -5,8 +5,16 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Text:</strong>
|
||||
<%= article.text %>
|
||||
Posted <%= time_tag article.created_at %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong><%= pluralize article.comments.count, "comment" %></strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Content:</strong>
|
||||
<%= article.content %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="comments">
|
||||
<%= render article.comments %>
|
||||
</div>
|
||||
|
||||
<%= render "comments/new", article: article %>
|
||||
@@ -3,6 +3,7 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= render @article %>
|
||||
<%= render "articles/comments", article: @article %>
|
||||
|
||||
<div>
|
||||
<%= link_to "Edit this article", edit_article_path(@article) %> |
|
||||
|
||||
Reference in New Issue
Block a user