mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +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)
|
||||
opts = {}
|
||||
serializer = options.fetch(:options, {}).fetch(:serializer, nil)
|
||||
serializer = options.fetch(:association_options, {}).fetch(:serializer, nil)
|
||||
opts[:serializer] = serializer if serializer
|
||||
opts
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user