removed timeline endless scrolling; now only shows 20 latest statuses. this is temporary; i plan to add pagination soon.
This commit is contained in:
parent
b3bb179f38
commit
42824e2b0c
2 changed files with 2 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ end
|
|||
end
|
||||
def timeline
|
||||
@statuses = Status.includes(:user, :icon_attachment)
|
||||
.order(created_at: :desc)
|
||||
.order(created_at: :desc).limit(20)
|
||||
end
|
||||
private
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<div class="timeline">
|
||||
<h1>Recent Statuses</h1>
|
||||
Showing the 20 most recent statuses.<hr>
|
||||
<% @statuses.each do |status| %> <p>
|
||||
<%= link_to "##{status.user.login}", user_path(status.user) %> said...
|
||||
<br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue