File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
active_model_serializers/adapter Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -208,17 +208,17 @@ def object_cache_key(serializer, adapter_instance)
208
208
end
209
209
end
210
210
211
- def cached_attributes ( options , cached_attributes , adapter_instance )
211
+ def cached_attributes ( fields , cached_attributes , adapter_instance )
212
212
if self . class . cache_enabled?
213
213
key = cache_key ( adapter_instance )
214
214
cached_attributes . fetch ( key ) do
215
215
cache_check ( adapter_instance ) do
216
- attributes ( options [ : fields] )
216
+ attributes ( fields )
217
217
end
218
218
end
219
219
else
220
220
cache_check ( adapter_instance ) do
221
- attributes ( options [ : fields] )
221
+ attributes ( fields )
222
222
end
223
223
end
224
224
end
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def serializable_hash_for_collection(options)
33
33
34
34
def serializable_hash_for_single_resource ( options )
35
35
cached_attributes = instance_options [ :cached_attributes ] || { }
36
- resource = serializer . cached_attributes ( options , cached_attributes , self )
36
+ resource = serializer . cached_attributes ( options [ :fields ] , cached_attributes , self )
37
37
relationships = resource_relationships ( options )
38
38
resource . merge ( relationships )
39
39
end
You can’t perform that action at this time.
0 commit comments