mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Merge pull request #337 from lserman/update-meta-key-docs
Updating documentation to warn users that { root: false } will ignore the meta key
This commit is contained in:
commit
8f583d2c46
@ -330,6 +330,9 @@ The above usage of `:meta_key` will produce the following:
|
||||
}
|
||||
```
|
||||
|
||||
When using meta information, your serializer cannot have the `{ root: false }` option, as this would lead to
|
||||
invalid JSON. If you do not have a root key, the meta information will be ignored.
|
||||
|
||||
If you would like direct, low-level control of attribute serialization, you can
|
||||
completely override the `attributes` method to return the hash you need:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user