Commit Graph

11 Commits

Author SHA1 Message Date
Santiago Pastorino
8bd2542ed2 Allow to pass context around serializers 2014-01-06 12:22:16 -02:00
Adrian Mugnolo and Santiago Pastorino
e2b7bba626 Stub out comments writer when needed 2013-12-16 17:10:20 -02:00
Adrian Mugnolo and Santiago Pastorino
ceded40aa1 Move serialization tests to serialization_test.rb 2013-12-16 16:59:04 -02:00
Adrian Mugnolo and Santiago Pastorino
af7437b7e4 Split basic object and model array serialization tests 2013-12-16 16:50:50 -02:00
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
Santiago Pastorino
daa9304398 Do not convert root and meta_key to Strings 2013-10-18 17:49:20 -02:00
Santiago Pastorino
75e9a2599d Store attributes as they are instead of converting them into Strings 2013-10-18 17:49:20 -02:00
Santiago Pastorino
8006529e20 Allow ArraySerializer to pass the options down to item serializers 2013-10-18 17:49:19 -02:00
Santiago Pastorino
626a85bc3e Allow using root = false in initialize 2013-10-18 17:49:19 -02:00
Santiago Pastorino
e6993c677b Add missing requires 2013-10-18 17:49:18 -02:00
Santiago Pastorino
a820e9774f Add ArraySerializer's root and meta features 2013-10-18 17:49:18 -02:00