Commit Graph

18 Commits

Author SHA1 Message Date
Alexandre de Oliveira
6eb75af96b Merge pull request #696 from ggordon/explicit_serializer
Explicitly set serializer for associations
2015-01-06 09:57:07 -02:00
Alexandre de Oliveira
bd27da1b76 Adds support for meta attribute
Currently, 0.10.0.pre doesn't support `meta` option in `render`. This
way, there's no way to support features such as pagination. `0.9` had
this feature in place.

This adds support for it, as well as fixes small things in README.md.

This won't support `meta` in array responses because arrays don't have
keys, obviously. Also, the response should have a `root` key, otherwise
no `meta` will be included.

In some cases, for example using JsonApi, ArraySerializer will result in
a response with a `root`. In that case, `meta` will be included.
2015-01-05 02:56:33 -02:00
James Herdman
faa6f906d6 A Friendly Note on Which AMS Version to Use
Per the discussion in #702, I figured it might be nice to note which
version of AMS is recommended to be used in new projects.
2014-11-20 10:20:04 -05:00
Gary Gordon
9f9715801a Explicitly set serializer for associations
Document specifying serializer for assocaition
2014-11-13 10:17:59 -05:00
Gary Gordon
08716d20c9 Rename attribute with :key (0.8.x compatibility) 2014-11-13 08:03:22 -05:00
Mike A. Owens
58b6c4a6b7 Allow for the implicit use of ArraySerializer when :each_serializer is specified. 2014-11-07 09:39:36 -05:00
Gary Gordon
c84430cdad Support serializer and each_serializer in render json 2014-11-05 15:10:14 -05:00
Gary Gordon
d5bae0c2f0 Include 'linked' member for json-api collections
The options passed to the render are partitioned into adapter options
and serializer options. 'include' and 'root' are sent to the adapter,
not sure what options would go directly to serializer, but leaving this
in until I understand that better.
2014-11-03 17:13:55 -05:00
Craig Little
76ce2130e7 Update build badge URL
s/steveklabnik/rails-api/
2014-09-03 00:43:58 -07:00
Tema Bolshakov
b4a313e6d8 Merge remote-tracking branch 'upstream/master' into feature/adapter 2014-08-29 12:55:20 +04:00
Laurent Arnoud
f02f5b767a README: typo fix on attributes 2014-08-27 11:48:14 +02:00
Tema Bolshakov
6cc4fa0258 * Configure adapter using ActiveModel::Serializer.config.adapter
* Get adapter instance using ActiveModel::Serializer::Adapter.adapter_for(serializer)
2014-08-27 09:05:28 +04:00
Žiga
e8727ae272 ruby syntax highlights 2014-08-25 19:21:15 +02:00
Steve Klabnik
09bc715c0b Update README with branch info, etc. 2014-08-22 17:01:14 -04:00
Steve Klabnik
67688b77e6 Typo.
❤️ @wycats
2014-07-05 12:11:08 -04:00
Steve Klabnik
4a2d9853ba First iteration of the README. 2014-07-05 01:50:14 -04:00
Steve Klabnik
4e0538255a Travis badge and first build 2014-07-05 00:58:44 -04:00
Steve Klabnik
c718915075 Generate a basic gem 2014-07-05 00:53:48 -04:00