This commit is contained in:
Jorge Manrubia
2025-06-10 11:19:13 +02:00
parent a916fe4470
commit 80c4e6fd92
2 changed files with 10 additions and 10 deletions
@@ -10,15 +10,15 @@ class Public::Collections::CardPreviewsController < ApplicationController
private
def find_cards
case params[:target]
when "considering-cards"
@collection.cards.considering.latest
when "doing-cards"
@collection.cards.doing.latest
when "closed-cards"
@collection.cards.closed.recently_closed_first
else
head :bad_request
Card.none
when "considering-cards"
@collection.cards.considering.latest
when "doing-cards"
@collection.cards.doing.latest
when "closed-cards"
@collection.cards.closed.recently_closed_first
else
head :bad_request
Card.none
end
end
end
+1 -1
View File
@@ -3,7 +3,7 @@ module Collection::Publishable
included do
has_one :publication, class_name: "Collection::Publication", dependent: :destroy
scope :published, ->{ joins(:publication) }
scope :published, -> { joins(:publication) }
end
class_methods do