Rename scope

This commit is contained in:
Jorge Manrubia
2025-04-10 17:18:02 +02:00
parent 9747d590ea
commit fac2fce3d5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ class CardsController < ApplicationController
def index
@considering = page_and_filter_for @filter.with(engagement_status: "considering"), per_page: PAGE_SIZE
@doing = page_and_filter_for @filter.with(engagement_status: "doing"), cards: @filter.cards.golden_first, per_page: PAGE_SIZE
@doing = page_and_filter_for @filter.with(engagement_status: "doing"), cards: @filter.cards.with_golden_first, per_page: PAGE_SIZE
@closed = page_and_filter_for @filter.with(indexed_by: "closed"), per_page: PAGE_SIZE
end
+1 -1
View File
@@ -6,7 +6,7 @@ module Card::Golden
has_one :goldness, dependent: :destroy, class_name: "Card::Goldness"
scope :golden_first, -> do
scope :with_golden_first, -> do
left_outer_joins(:goldness).tap do |relation|
relation.order_values.unshift("card_goldnesses.id IS NULL")
end