Have to opt in with #cache_key

This commit is contained in:
twinturbo
2012-07-11 16:51:15 +02:00
parent e923174a26
commit 535a33a33b
2 changed files with 9 additions and 15 deletions

View File

@@ -30,10 +30,6 @@ class CachingTest < ActiveModel::TestCase
%w(ruby)
end
def cache_key
name
end
def read_attribute_for_serialization(name)
send name
end
@@ -61,6 +57,10 @@ class CachingTest < ActiveModel::TestCase
def self.to_s
'serializer'
end
def cache_key
object.name
end
end
serializer.cache = NullStore.new
@@ -82,6 +82,10 @@ class CachingTest < ActiveModel::TestCase
def self.to_s
'serializer'
end
def cache_key
object.name
end
end
serializer.cache = NullStore.new