Commit Graph

20 Commits

Author SHA1 Message Date
Lucas Hosseini
503bfe9598 Move meta/meta_key handling inside adapter. 2015-10-05 19:06:50 +02:00
L. Preston Sego III
3fe343f240 Merge pull request #1232 from beauby/move-root-to-adapter
Extract attributes filtering from serializer into adapter.
2015-10-05 12:56:54 -04:00
Lucas Hosseini
658810e6a0 Extract attributes filtering from serializer into adapter. 2015-10-05 08:21:26 +02:00
Lucas Hosseini
7847d05ecb Remove root_name class method from Serializer, as it is used nowhere. 2015-10-05 07:27:13 +02:00
Lucas Hosseini
34d65716cb Merge pull request #1214 from NullVoxPopuli/issue/1211-failing-test
Fix #1211, include_tree is null when using the key: options
2015-10-02 15:29:04 +02:00
Liam Bowen
f8323fc9e5 Fixes #1211 - retrieve the key from the reflection options when building associations 2015-10-02 08:52:21 -04:00
Benjamin Fleischer
9d7da8afc4 Add support for top level jsonapi member. 2015-10-01 21:22:49 -05:00
Benjamin Fleischer
3f91015a7b Update CHANGELOG.md using github-changes
https://github.com/lalitkapoor/github-changes
2015-09-21 10:44:49 -05:00
L. Preston Sego III
a74ea189cd Refactors of the Attribute adapter. Adds support for nested associations specified from the include key in the controller. Adds some tests and some method documentation 2015-09-21 10:35:47 -04:00
Lucas Hosseini
ac06013aeb Add support for wildcard includes + improve perfs on JsonApi includes. 2015-09-21 05:58:00 +02:00
Benjamin Fleischer
19de5f7722 Introduce Adapter::Base
Breaking change:
- Adapters now inherit Adapter::Base
- 'Adapter' is now a module, no longer a class
Why?

- using a class as a namespace that you also inherit from is complicated and circular at time i.e.
  buggy (see https://github.com/rails-api/active_model_serializers/pull/1177)
- The class methods on Adapter aren't necessarily related to the instance methods, they're more
    Adapter functions
- named `Base` because it's a Rails-ism
- It helps to isolate and highlight what the Adapter interface actually is
2015-09-20 12:26:04 -05:00
Benjamin Fleischer
0091be89f8 Consistently refer to the 'JSON API' and the 'JsonApi' adapter 2015-09-17 15:22:28 -05:00
Lucas Hosseini
ce7a839f3d Extended format for JSONAPI include option. 2015-09-13 22:45:47 +02:00
Bruno Bacarini
36c452e60b add pagination feature to changelog file 2015-08-18 19:04:03 -03:00
João Moura
867d36a3a3 updating readme and changelog 2015-06-18 19:17:44 -03:00
João Moura
792fb8a905 Adding Fragment Cache to AMS
It's an upgrade based on the new Cache implementation #693.
It allows to use the Rails conventions to cache
specific attributes or associations.
It's based on the Cache Composition implementation.
2015-04-05 18:19:57 -03:00
Mateo Murphy
4fcacb0b16 Update CHANGELOG.md 2015-03-22 20:43:56 -04:00
Gary Gordon
651b99f22e Support has_one to be compatible with 0.8.x
Update README and CHANGELOG
2015-03-01 13:47:34 -05:00
Alexandre de Oliveira
e771e637bf Updates CHANGELOG to include association overriding 2015-01-29 16:52:39 -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