active_model_serializers/lib/active_model
Arne Brasseur 1db96ec7a9 When using embed: :ids ; embed_in_root: true, and serializing multiple objects,
only the associated objects of the last object in the collection will actually
show up in the serialized data.

For example, if you serialize a collection of two posts, each containing one or
more comments, only the comments of the last post show up. The reason is a
Hash#merge wich overwrites the array rather than appending to it.

This commit fixes this by merging the collection arrays, rather than the top-level
hashes.
2013-11-11 14:30:34 +01:00
..
serializer Pass scope through to associations via @lastobelus 2013-11-04 10:48:19 -02:00
array_serializer.rb When using embed: :ids ; embed_in_root: true, and serializing multiple objects, 2013-11-11 14:30:34 +01:00
default_serializer.rb Make DefaultSerializer include AM::Serializable so embedded_in_root_associations is always defined also there 2013-11-01 22:35:56 -02:00
serializable.rb Make ArraySerializer reuse Serializer embedded_in_root_associations code 2013-10-31 17:28:39 -02:00
serializer_support.rb Add ActiveModel::SerializerSupport 2013-10-24 16:09:00 -02:00
serializer.rb Pass scope through to associations via @lastobelus 2013-11-04 10:48:19 -02:00