Skip to content

Commit 1ac82a1

Browse files
committed
Merge pull request #1149 from mattmueller/update-docs-for-nested-includes
Update README with nested included association example.
2 parents 7e2f3d1 + 6395f69 commit 1ac82a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ Doesn't follow any specifc convention.
204204
This adapter follows 1.0 of the format specified in
205205
[jsonapi.org/format](http://jsonapi.org/format). It will include the associated
206206
resources in the `"included"` member when the resource names are included in the
207-
`include` option.
207+
`include` option. Including nested associated resources is also supported.
208208

209209
```ruby
210-
render @posts, include: ['authors', 'comments']
210+
render @posts, include: ['author', 'comments', 'comments.author']
211211
# or
212-
render @posts, include: 'authors,comments'
212+
render @posts, include: 'author,comments,comments.author'
213213
```
214214

215215
## Installation

0 commit comments

Comments
 (0)