Split indexed_by into two filters: indexed by and sort by

https://3.basecamp.com/2914079/buckets/37331921/todos/8877489555#__recording_8987808963
This commit is contained in:
Jorge Manrubia
2025-08-21 19:12:54 +02:00
parent 311fc20837
commit c8569ce8b9
15 changed files with 100 additions and 31 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class Filter < ApplicationRecord
def cards
@cards ||= begin
result = creator.accessible_cards.indexed_by(indexed_by)
result = creator.accessible_cards.indexed_by(indexed_by).sorted_by(sorted_by)
result = result.where(id: card_ids) if card_ids.present?
result = result.open unless include_closed_cards?
result = result.by_engagement_status(engagement_status) if engagement_status.present?