From 06125bf882b6c3e1472c76be770736e2ca6f4abb Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 14 Nov 2020 13:14:33 +0000 Subject: [PATCH] change created_at to updated_at for recent statuses to use index --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/status.rb b/app/models/status.rb index 066a978e..7e3dbe8e 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -94,7 +94,7 @@ class Status < ApplicationRecord default_scope { recent } - scope :recent, -> { reorder(created_at: :desc) } + scope :recent, -> { reorder(updated_at: :desc) } scope :remote, -> { where(local: false).or(where.not(uri: nil)) } scope :local, -> { where(local: true).or(where(uri: nil)) }