From 42824e2b0c3abde5eb426d24092e5824acc4e218 Mon Sep 17 00:00:00 2001 From: agnesthealien Date: Thu, 19 Mar 2026 07:07:01 -0400 Subject: [PATCH] removed timeline endless scrolling; now only shows 20 latest statuses. this is temporary; i plan to add pagination soon. --- app/controllers/statuses_controller.rb | 2 +- app/views/statuses/timeline.html.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index bb5449b..abd4c80 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -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 diff --git a/app/views/statuses/timeline.html.erb b/app/views/statuses/timeline.html.erb index 69091c8..fdbd7c2 100644 --- a/app/views/statuses/timeline.html.erb +++ b/app/views/statuses/timeline.html.erb @@ -1,5 +1,6 @@

Recent Statuses

+Showing the 20 most recent statuses.
<% @statuses.each do |status| %>

<%= link_to "##{status.user.login}", user_path(status.user) %> said...