mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Added note that objects will not be side-loaded if root is set to false
This commit is contained in:
@@ -547,6 +547,10 @@ this:
|
||||
}
|
||||
```
|
||||
|
||||
When side-loading data, your serializer cannot have the `{ root: false }` option,
|
||||
as this would lead to invalid JSON. If you do not have a root key, the `include`
|
||||
instruction will be ignored
|
||||
|
||||
You can also specify a different root for the embedded objects than the key
|
||||
used to reference them:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user