mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Only set cache_versioning to true on rails versions when relevant
This commit is contained in:
parent
7f751fc1f7
commit
70604bbae7
@ -151,8 +151,11 @@ module ActiveModelSerializers
|
||||
@blog_serializer = BlogSerializer.new(@blog)
|
||||
end
|
||||
|
||||
def test_expire_of_cache
|
||||
def test_expiring_of_cache_at_update_of_record
|
||||
if ARModels::Author.respond_to?(:cache_versioning)
|
||||
ARModels::Author.cache_versioning = true
|
||||
end
|
||||
|
||||
author = ARModels::Author.create(name: 'Foo')
|
||||
author_json = AuthorSerializerWithCache.new(author).as_json
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user