Skip to content

Commit

Permalink
display only 5 recent comments on each post
Browse files Browse the repository at this point in the history
  • Loading branch information
cherelemma committed Jul 1, 2023
1 parent a320034 commit 8423f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/posts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>

<div class="post-comments">
<% post.comments.each do |comment| %>
<% post.recent_comments.each do |comment| %>
<div class="comment">
<span class="comment-author"><%= comment.user.name %>:</span>
<span><%= comment.text %></span>
Expand Down

0 comments on commit 8423f35

Please sign in to comment.