Fix options merge order in each_association

Custom association serializers were getting clobbered when using an each serializer.
This commit is contained in:
Mateo Murphy
2015-03-20 00:22:46 -04:00
parent 9058d5fce7
commit 03372ea61d
2 changed files with 33 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ module ActiveModel
serializer = serializer_class.new(
association_value,
serializer_from_options(association_options).merge(options)
options.merge(serializer_from_options(association_options))
) if serializer_class
if block_given?