From d39df35441d7e4b39a57402e554ed92b1ec2e1f1 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 15 Feb 2022 00:07:04 +0900 Subject: [PATCH] Fix admin statuses page order with media (#17538) --- app/models/admin/status_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/admin/status_filter.rb b/app/models/admin/status_filter.rb index ce5bb5f461..4fba612a65 100644 --- a/app/models/admin/status_filter.rb +++ b/app/models/admin/status_filter.rb @@ -31,7 +31,7 @@ class Admin::StatusFilter def scope_for(key, value) case key.to_s when 'media' - Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id) + Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id).reorder('statuses.id desc') when 'id' Status.where(id: value) else