Extended format for JSONAPI include option.

This commit is contained in:
Lucas Hosseini
2015-09-10 01:20:39 +02:00
parent b594d1487b
commit ce7a839f3d
12 changed files with 159 additions and 56 deletions

View File

@@ -30,6 +30,8 @@ resources in the `"included"` member when the resource names are included in the
render @posts, include: 'authors,comments'
```
The format of the `include` option can be either a String composed of a comma-separated list of [relationship paths](http://jsonapi.org/format/#fetching-includes), an Array of Symbols and Hashes, or a mix of both.
## Choosing an adapter
If you want to use a specify a default adapter, such as JsonApi, you can change this in an initializer: