Skip to content

Commit e9e29e4

Browse files
committed
Removed limit from comments listed.
1 parent 72c84a7 commit e9e29e4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

app/controllers/articles_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def index
66

77
def show
88
@article = Article.find(params[:id])
9-
@comments = @article.comments.order(created_at: :desc).limit(20)
9+
@comments = @article.comments.order(created_at: :desc)
1010
@comment = Comment.new
1111
end
1212

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h1>user.name 's' Articles</h1>
2+
<ul>
3+
<% user.articles.each do |article| %>
4+
<li>
5+
<%= link_to article.title, article.link %> - Posted by <%= link_to article.user.name, article.user %> on <%= article.created_at.strftime("%B %d, %Y at %I:%M %p") %>
6+
<div>
7+
<%= link_to "comment", article %>
8+
</div>
9+
</li>
10+
<% end %>
11+
</ul>
12+
13+
<%= paginate @articles %>

0 commit comments

Comments
 (0)