mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Updated to use the proper renderer
This commit is contained in:
parent
49ee823a53
commit
714c620ea2
@ -117,7 +117,7 @@ will generate the path `/posts/{postId}?include='comments'`
|
||||
|
||||
So then in your controller, you'll want to be sure to have something like:
|
||||
```ruby
|
||||
render json: @post, include: params[:include]
|
||||
render jsonapi: @post, include: params[:include]
|
||||
```
|
||||
|
||||
If you want to use `include` on a collection, you'd write something like this:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user