mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Update rendering.md
This commit is contained in:
@@ -122,14 +122,15 @@ Specify the root by passing it as an argument to `render`. For example:
|
||||
render json: @user_post, root: "admin_post", adapter: :json
|
||||
```
|
||||
|
||||
This will produce serialize as:
|
||||
This will be rendered as:
|
||||
```json
|
||||
{"admin_post": {
|
||||
"title": "how to do open source"
|
||||
{
|
||||
"admin_post": {
|
||||
"title": "how to do open source"
|
||||
}
|
||||
}
|
||||
```
|
||||
`Note: the Attributes adapter (default) does not include a resource root.`
|
||||
Note: the `Attributes` adapter (default) does not include a resource root.
|
||||
|
||||
#### serializer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user