Skip to content

Commit 51af5a4

Browse files
committed
fix typo caught by duduribeiro
1 parent ce17a1b commit 51af5a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/general/adapters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ when the resource names are included in the `include` option.
6363
Including nested associated resources is also supported.
6464

6565
```ruby
66-
render @posts, include: ['author', 'comments', 'comments.author']
66+
render json: @posts, include: ['author', 'comments', 'comments.author']
6767
# or
68-
render @posts, include: 'author,comments,comments.author'
68+
render json: @posts, include: 'author,comments,comments.author'
6969
```
7070

7171
In addition, two types of wildcards may be used:
@@ -76,7 +76,7 @@ In addition, two types of wildcards may be used:
7676
These can be combined with other paths.
7777

7878
```ruby
79-
render @posts, include: '**' # or '*' for a single layer
79+
render json: @posts, include: '**' # or '*' for a single layer
8080
```
8181

8282
The format of the `include` option can be either:
@@ -94,15 +94,15 @@ The following would render posts and include:
9494
It could be combined, like above, with other paths in any combination desired.
9595

9696
```ruby
97-
render @posts, include: 'author.comments.**'
97+
render json: @posts, include: 'author.comments.**'
9898
```
9999

100100
##### Security Considerations
101101

102102
Since the included options may come from the query params (i.e. user-controller):
103103

104104
```ruby
105-
render @posts, include: params[:include]
105+
render json: @posts, include: params[:include]
106106
```
107107

108108
The user could pass in `include=**`.

0 commit comments

Comments
 (0)