Collections touch the cards when the name changes

This commit is contained in:
Jorge Manrubia
2025-10-30 15:12:47 +01:00
parent d0c33b8550
commit ae4a07f843
3 changed files with 3 additions and 4 deletions
@@ -11,6 +11,6 @@ module CollectionScoped
end
def cards_fresh_when(cards)
fresh_when etag: [ cards, @collection.entropy_configuration, @collection.name, @collection.columns.all ]
fresh_when etag: [ cards, @collection.entropy_configuration, @collection.columns.all ]
end
end
+1 -1
View File
@@ -48,6 +48,6 @@ module CardsHelper
end
def card_preview_cache_parts(card)
[ card, card.collection.entropy_configuration, card.collection.publication, card.collection.name, card.column ]
[ card, card.collection.entropy_configuration, card.collection.publication, card.column ]
end
end
+1 -2
View File
@@ -1,11 +1,10 @@
class Collection < ApplicationRecord
include AutoClosing, Accessible, Broadcastable, Entropic, Filterable, Publishable, Triageable
include AutoClosing, Accessible, Broadcastable, Cards, Entropic, Filterable, Publishable, Triageable
belongs_to :creator, class_name: "User", default: -> { Current.user }
has_rich_text :public_description
has_many :cards, dependent: :destroy
has_many :tags, -> { distinct }, through: :cards
has_many :events
has_many :webhooks, dependent: :destroy