removed timeline endless scrolling; now only shows 20 latest statuses. this is temporary; i plan to add pagination soon.

This commit is contained in:
agnesthealien 2026-03-19 07:07:01 -04:00
parent b3bb179f38
commit 42824e2b0c
2 changed files with 2 additions and 1 deletions

View file

@ -76,7 +76,7 @@ end
end end
def timeline def timeline
@statuses = Status.includes(:user, :icon_attachment) @statuses = Status.includes(:user, :icon_attachment)
.order(created_at: :desc) .order(created_at: :desc).limit(20)
end end
private private

View file

@ -1,5 +1,6 @@
<div class="timeline"> <div class="timeline">
<h1>Recent Statuses</h1> <h1>Recent Statuses</h1>
Showing the 20 most recent statuses.<hr>
<% @statuses.each do |status| %> <p> <% @statuses.each do |status| %> <p>
<%= link_to "##{status.user.login}", user_path(status.user) %> said... <%= link_to "##{status.user.login}", user_path(status.user) %> said...
<br> <br>