lib/dato/json_api_serializer.rb in dato-0.7.18 vs lib/dato/json_api_serializer.rb in dato-0.8.0

- old
+ new

@@ -87,16 +87,18 @@ result.empty? ? nil : result end def attributes(resource) if type == 'item' - return resource.keys.map(&:to_sym) - %i[ - item_type - id - created_at - updated_at - creator - ] + return resource.keys.reject do |key| + %i[ + item_type + id + created_at + updated_at + creator + ].include?(key.to_sym) + end end link_attributes['properties'].keys.map(&:to_sym) end