mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
wordsmitting
This commit is contained in:
parent
65cf4836c8
commit
993a48fdcf
@ -65,7 +65,7 @@ Where:
|
|||||||
- `virtual_value:`
|
- `virtual_value:`
|
||||||
- `polymorphic:` defines if polymorphic relation type should be nested in serialized association.
|
- `polymorphic:` defines if polymorphic relation type should be nested in serialized association.
|
||||||
- `type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
|
- `type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
|
||||||
- `class_name:` used to determine `type` when `type` not given. `class_name` option to supply the model name as string.
|
- `class_name:` used to determine `type` when `type` is not given. `class_name` option to supply the model name as string.
|
||||||
- `foreign_key:` used by JSON:API on a `belongs_to` relationship to avoid unnecessarily loading the association object.
|
- `foreign_key:` used by JSON:API on a `belongs_to` relationship to avoid unnecessarily loading the association object.
|
||||||
- `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.
|
- `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.
|
||||||
- optional: `&block` is a context that returns the association's attributes.
|
- optional: `&block` is a context that returns the association's attributes.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user