Use last_active_at column for sorting since we are now touching updated_at for invalidating

This commit is contained in:
Jorge Manrubia
2025-10-30 16:28:56 +01:00
parent 3c8c4abc17
commit 12d461f8d1
8 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -16,8 +16,7 @@ class Card < ApplicationRecord
scope :reverse_chronologically, -> { order created_at: :desc, id: :desc }
scope :chronologically, -> { order created_at: :asc, id: :asc }
scope :latest, -> { order updated_at: :desc, id: :desc }
scope :by_last_activity, -> { order last_active_at: :desc, id: :desc }
scope :latest, -> { order last_active_at: :desc, id: :desc }
scope :indexed_by, ->(index) do
case index