Merge pull request #949 from edwardloveall/el-870-fix

Don't pass serializer option to associated serializers
This commit is contained in:
João Moura
2015-06-13 03:01:25 -03:00
6 changed files with 37 additions and 11 deletions

View File

@@ -220,7 +220,7 @@ module ActiveModel
if serializer_class
serializer = serializer_class.new(
association_value,
options.merge(serializer_from_options(association_options))
options.except(:serializer).merge(serializer_from_options(association_options))
)
elsif !association_value.nil? && !association_value.instance_of?(Object)
association_options[:association_options][:virtual_value] = association_value