Add column color to cache keys

So cards change colors when you change the column color
This commit is contained in:
Jason Zimdars
2025-10-08 17:08:32 -05:00
parent 9d1d21b625
commit fcba8b6acb
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -35,6 +35,6 @@ module CardsHelper
end
def cacheable_preview_parts_for(card, *options)
[ card, card.collection, card.collection.entropy_configuration, card.collection.publication, *options ]
[ card, card.collection, card.collection.entropy_configuration, card.collection.publication, card.column&.color, *options ]
end
end
+1 -1
View File
@@ -21,7 +21,7 @@ module Card::Cacheable
end
def for_preview(*other)
[ card, card.collection.entropy_configuration, card.collection.publication, *other ]
[ card, card.collection.entropy_configuration, card.collection.publication, card.column&.color, *other ]
end
end
end
+1 -1
View File
@@ -1,4 +1,4 @@
json.cache! card do
json.cache! [card, card.column&.color] do
json.(card, :id, :title, :status)
json.image_url card.image.presence && url_for(card.image)