Fix explicit serializer for associations

This commit is contained in:
Will Jordan 2015-02-24 16:01:43 -08:00
parent a8243761fe
commit f2ee544a88

View File

@ -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