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/serializers.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,7 @@ Where:
67
67
-`type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
68
68
-`class_name:` used to determine `type` when `type` not given
69
69
-`foreign_key:` used by JSON:API on a `belongs_to` relationship to avoid unnecessarily loading the association object.
70
+
-`namespace:` used when looking up the serializer and `serializer` is not given. Falls back to the parent serializer's `:namespace` instance options, which, when present, comes from the render options. See [Rendering#namespace](rendering.md#namespace] for more details.
70
71
- optional: `&block` is a context that returns the association's attributes.
71
72
- prevents `association_name` method from being called.
72
73
- return value of block is used as the association value.
0 commit comments