Move cache_key to the new cacheable concern

This commit is contained in:
Jorge Manrubia
2025-09-19 12:45:37 +02:00
parent b87badaf33
commit 1633c56a08
2 changed files with 4 additions and 4 deletions
-4
View File
@@ -41,10 +41,6 @@ class Card < ApplicationRecord
delegate :accessible_to?, to: :collection
def cache_key
[ super, collection.name ].compact.join("/")
end
def card
self
end
+4
View File
@@ -1,6 +1,10 @@
module Card::Cacheable
extend ActiveSupport::Concern
def cache_key
[ super, collection.name ].compact.join("/")
end
def cache_invalidation_parts
@cache_invalidation_parts ||= InvalidationParts.new(self)
end