Implement has_one's embed objects

This commit is contained in:
Santiago Pastorino
2013-08-13 18:12:00 -03:00
parent d756ae4a70
commit 52bb3f6929
3 changed files with 22 additions and 4 deletions

View File

@@ -75,8 +75,8 @@ module ActiveModel
if association.embed_ids?
hash[association.key] = serialize_ids association
elsif association.embed_objects?
# TODO
hash
associated_data = send(association.name)
hash[association.embedded_key] = association.build_serializer(associated_data).serializable_hash
end
end
end