mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Pass fields down from constructor
This commit is contained in:
committed by
Benjamin Fleischer
parent
cd9689683c
commit
be01fc8ee7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user