Pass fields down from constructor

This commit is contained in:
Filippos Vasilakis
2015-10-21 09:23:47 +02:00
committed by Benjamin Fleischer
parent cd9689683c
commit be01fc8ee7
2 changed files with 15 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ module ActiveModelSerializers
class Attributes < Base
def serializable_hash(options = nil)
options = serialization_options(options)
options[:fields] ||= instance_options[:fields]
serializer.serializable_hash(instance_options, options, self)
end
end