Commit Graph

13 Commits

Author SHA1 Message Date
Luke Mayhew
cfcd712123 Fix ArraySerializer's output when falling back on DefaultSerializer
Change ArraySerializer's initialization of DefaultSerializer to pass
:root => false in order to avoid adding root keys to each of the
items in the array. This ensures consistent results between serializing
arrays of objects with serializers and arrays of objects without
serializers. Fixes #495.
2014-04-01 22:38:58 -06:00
Jason Kriss
4e762ee8b5 fix a couple typos 2013-04-18 13:39:14 -07:00
Prathamesh Sonpatki
7d1ce9c56e Fixed typos 2013-03-26 18:18:20 +05:30
Kevin Mahoney
2bd447d69d Pass options through when using default serializer 2013-03-22 13:12:33 +00:00
twinturbo
c3966fe741 ArraySerializer is also cached 2013-03-14 22:54:05 +01:00
Adam Stanton
5a55a6831a Remove line break on the conditional statement. 2013-03-06 11:48:50 -08:00
Adam Stanton
da26ebd26f Merge branch 'create-default-serializer' into HEAD
Conflicts:
	lib/active_model/array_serializer.rb
2013-03-05 21:48:58 -08:00
Nicholas Mulder
fa51c5f574 Add ActiveSupport::DescendantsTracker to Serializer and ArraySerializer 2013-02-28 10:01:40 -05:00
Tony Pitale
dcd4121322 reduce 2x map; fixes datamapper eager loading 2013-02-17 16:44:27 -05:00
Adam Stanton
c4fcf96eb4 Move DefaultSerializer from array_serializer.rb to serializer.rb 2013-02-10 09:49:11 -08:00
Adam Stanton
8f6218c587 Create DefaultSerializer so that as_json uses same interface.
This is to ensure that PORO's as_json is called if no serializer
is specified.

Original behaviour was that serializable_hash was being called,
overriding the as_json method.
2013-02-10 09:06:24 -08:00
tchak
a71698d5bb Add support for meta key
Test for meta_key serialization
2012-11-22 13:44:59 +01:00
Tee Parham
b8f01ba2f3 move ArraySerializer to separate file 2012-09-18 01:28:07 +02:00