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)
208208 end
209209 end
210210
211- def cached_attributes ( options , cached_attributes , adapter_instance )
211+ def cached_attributes ( fields , cached_attributes , adapter_instance )
212212 if self . class . cache_enabled?
213213 key = cache_key ( adapter_instance )
214214 cached_attributes . fetch ( key ) do
215215 cache_check ( adapter_instance ) do
216- attributes ( options [ : fields] )
216+ attributes ( fields )
217217 end
218218 end
219219 else
220220 cache_check ( adapter_instance ) do
221- attributes ( options [ : fields] )
221+ attributes ( fields )
222222 end
223223 end
224224 end
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def serializable_hash_for_collection(options)
3333
3434 def serializable_hash_for_single_resource ( options )
3535 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 )
3737 relationships = resource_relationships ( options )
3838 resource . merge ( relationships )
3939 end
You can’t perform that action at this time.
0 commit comments