Associations doesn't depend on source serializer anymore

This commit is contained in:
Santiago Pastorino
2013-05-13 16:00:16 -07:00
parent 460a250984
commit 5017fb686a
2 changed files with 10 additions and 6 deletions

View File

@@ -392,6 +392,10 @@ module ActiveModel
Associations::HasOne
end
options[:value] ||= send(name)
options[:embed] = _embed unless options.key?(:embed)
options[:include] = _root_embed unless options.key?(:include)
options[:serializer_options] = self.options
association = association_class.new(name, self, options)
if association.embed_ids?