Extract attributes filtering from serializer into adapter.

This commit is contained in:
Lucas Hosseini
2015-10-05 06:08:11 +02:00
parent 066990184b
commit 658810e6a0
8 changed files with 35 additions and 59 deletions

View File

@@ -57,7 +57,10 @@ module ActiveModel
def resource_object_for(options)
cache_check(serializer) do
serializer.attributes(options)
attributes = serializer.attributes
attributes.slice!(*options[:fields]) if options[:fields]
attributes
end
end
end