You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/general/rendering.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,25 +113,24 @@ PR please :)
113
113
114
114
#### root
115
115
116
-
By default the Json Adapter `root` will follow snake case format, like so:
116
+
The resource root is derived from the class name of the resource being serialized.
117
+
e.g. `UserPostSerializer.new(UserPost.new)` will be serialized with the root `user_post` or `user_posts` according the adapter collection pluralization rules.
117
118
118
-
| resource | single root | collection root |
119
-
|----------|-------------|-----------------|
120
-
| UserPost | user_posts | user_post |
121
-
122
-
If you would like to change the `root` of your json, specify it in the render call:
119
+
Specify the root by passing it as an argument to `render`. For example:
0 commit comments