File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
lib/active_model/serializer/adapter Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ def fetch
35
35
private
36
36
37
37
def cached_attributes ( klass , serializers )
38
- cached_attributes = ( klass . _cache_only ) ? klass . _cache_only : serializer . attributes . keys . delete_if { |attr | klass . _cache_except . include? ( attr ) }
39
- non_cached_attributes = serializer . attributes . keys . delete_if { |attr | cached_attributes . include? ( attr ) }
38
+ attributes = serializer . class . _attributes
39
+ cached_attributes = ( klass . _cache_only ) ? klass . _cache_only : attributes . reject { |attr | klass . _cache_except . include? ( attr ) }
40
+ non_cached_attributes = attributes - cached_attributes
40
41
41
42
cached_attributes . each do |attribute |
42
43
options = serializer . class . _attributes_keys [ attribute ]
@@ -75,4 +76,4 @@ def fragment_serializer(name, klass)
75
76
end
76
77
end
77
78
end
78
- end
79
+ end
You can’t perform that action at this time.
0 commit comments