Commit Graph

12 Commits

Author SHA1 Message Date
José Valim
cc5f102e2d Remove implicit constant lookup in serializers in favor active_model_serializer API. 2011-12-21 08:48:29 +01:00
José Valim
97ff4d28e6 Allow as_json(true) to be given. 2011-12-21 08:17:22 +01:00
Yehuda Katz
df9ad0ef11 Improve serializers:
* Many nested levels of associations can now insert
  their information alongside the original when
  embed :ids, :include => true is true
* Add support for passing options to serializers
* Fix Array serializers so they don't try to insert
  roots for each child object and so they can be
  provided a root.
* TODO: Array serializers should require a root
* TODO: Make merging associations at the root more
  efficient if possible
2011-12-20 00:03:29 -08:00
Yehuda Katz
8bdb7da272 Fix compatibility mistakes with ActiveRecord 2011-12-19 23:07:55 -08:00
Adman65
2c240cf2e0 Implicit detection for has_many serializer 2011-12-09 16:16:09 +01:00
Yehuda Katz
09ddc79ce0 Better tests for embeds 2011-12-07 15:12:56 -08:00
Yehuda Katz
57ef67dcb4 Allow attribute aliasing 2011-12-07 14:35:07 -08:00
Yehuda Katz
7dd3bdaca9 We can't just piggyback on serialization because it may already be included at this point. 2011-12-07 12:25:11 -08:00
Yehuda Katz
ca7786c2e0 Rename :as to :key, as it's confusing 2011-12-07 12:16:22 -08:00
Yehuda Katz
0f4b61fbcf Provide a schema for a serializer 2011-12-07 11:56:27 -08:00
Adman65
498c780a8f Closes #4 2011-12-06 15:52:28 +02:00
José Valim
5a230e8e66 Added tests. 2011-12-01 08:19:14 +01:00