mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Move options to configuration
This commit is contained in:
committed by
Santiago Pastorino
parent
3db2fcec6c
commit
1e5ea0b356
@@ -58,8 +58,9 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def build_serializer(object, options = {})
|
||||
options[:_wrap_in_array] = embed_in_root?
|
||||
super
|
||||
super.tap do |instance|
|
||||
instance.configuration.wrap_in_array = embed_in_root?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user