Move cache_key to the new cacheable concern
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user