Skip to content

Commit 65cf483

Browse files
committed
Updated class_name defination.
1 parent f3b2027 commit 65cf483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/general/serializers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Where:
6565
- `virtual_value:`
6666
- `polymorphic:` defines if polymorphic relation type should be nested in serialized association.
6767
- `type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
68-
- `class_name:` used to determine `type` when `type` not given
68+
- `class_name:` used to determine `type` when `type` not given. `class_name` option to supply the model name as string.
6969
- `foreign_key:` used by JSON:API on a `belongs_to` relationship to avoid unnecessarily loading the association object.
7070
- `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.
7171
- optional: `&block` is a context that returns the association's attributes.

0 commit comments

Comments
 (0)