mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix explicit serializer for associations
This commit is contained in:
parent
a8243761fe
commit
f2ee544a88
@ -176,7 +176,7 @@ module ActiveModel
|
|||||||
|
|
||||||
def serializer_from_options(options)
|
def serializer_from_options(options)
|
||||||
opts = {}
|
opts = {}
|
||||||
serializer = options.fetch(:options, {}).fetch(:serializer, nil)
|
serializer = options.fetch(:association_options, {}).fetch(:serializer, nil)
|
||||||
opts[:serializer] = serializer if serializer
|
opts[:serializer] = serializer if serializer
|
||||||
opts
|
opts
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user