Skip to content

Commit ec7b585

Browse files
committed
Document namespace
1 parent 96028a7 commit ec7b585

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/general/serializers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Where:
6767
- `type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
6868
- `class_name:` used to determine `type` when `type` not given
6969
- `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.
7071
- optional: `&block` is a context that returns the association's attributes.
7172
- prevents `association_name` method from being called.
7273
- return value of block is used as the association value.

0 commit comments

Comments
 (0)