Embedded has_one returns an array with the key pluralized

This commit is contained in:
Santiago Pastorino
2013-08-26 14:48:39 -03:00
parent 3fcd8c5f98
commit 8a495b1d00
3 changed files with 7 additions and 7 deletions

View File

@@ -101,7 +101,7 @@ module ActiveModel
if associated_data.respond_to?(:to_ary)
associated_data.map { |elem| association.build_serializer(elem).serializable_hash }
else
association.build_serializer(associated_data).serializable_hash
[association.build_serializer(associated_data).serializable_hash]
end
end