Add column color to cache keys
So cards change colors when you change the column color
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user