mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Clean up docs
This commit is contained in:
parent
a0dd5e58cc
commit
26bcdbe44a
@ -1,3 +1,5 @@
|
||||
[Back to Guides](../README.md)
|
||||
|
||||
# How to add root key
|
||||
|
||||
Add the root key to your API is quite simple with ActiveModelSerializers. The **Adapter** is what determines the format of your JSON response. The default adapter is the ```Attributes``` which doesn't have the root key, so your response is something similar to:
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
The AMS grape formatter relies on the existence of `env['grape.request']` which is implemeted by `Grape::Middleware::Globals`. You can meet his dependency by calling it before mounting the endpoints.
|
||||
[Back to Guides](../README.md)
|
||||
|
||||
The ActiveModelSerializers grape formatter relies on the existence of `env['grape.request']` which is implemeted by `Grape::Middleware::Globals`. You can meet his dependency by calling it before mounting the endpoints.
|
||||
|
||||
In the simpliest way:
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
[Back to Guides](../README.md)
|
||||
|
||||
# How to test
|
||||
|
||||
## Controller Serializer Usage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user