Skip to content

Commit

Permalink
[skip ci] Fix root key documentation (rails-api#1761)
Browse files Browse the repository at this point in the history
The current documentation stated that it was not possible to override
the root key for the JSON adapter. This was removed from the
documentation and it now links the useful documentation pages.
  • Loading branch information
Yohan Robert authored and remear committed May 31, 2016
1 parent 6e609c1 commit b8af289
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/general/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ Doesn't follow any specific convention.

### JSON

The response document always with a root key.
The json response is always rendered with a root key.

The root key **can't be overridden**, and will be derived from the resource being serialized.
The root key can be overridden by:
* passing the `root` option in the render call. See details in the [Rendering Guides](rendering.md#overriding-the-root-key).
* setting the `type` of the serializer. See details in the [Serializers Guide](serializers.md#type).

Doesn't follow any specific convention.

Expand Down

0 comments on commit b8af289

Please sign in to comment.