mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Add info on setting polymorphic serializers (#1906)
While this same document provides details on how to override the serializer_for, not all users will realize this could be used to set the sterilizers for polymorphic relationships. This change just adds a link to that documentation and makes that point obvious.
This commit is contained in:
parent
50f27546c3
commit
1899437566
@ -140,7 +140,7 @@ class PictureSerializer < ActiveModel::Serializer
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
For more context, see the [tests](../../test/adapter/polymorphic_test.rb) for each adapter.
|
You can specify the serializers by [overriding serializer_for](serializers.md#overriding-association-serializer-lookup). For more context about polymorphic relationships, see the [tests](../../test/adapter/polymorphic_test.rb) for each adapter.
|
||||||
|
|
||||||
### Caching
|
### Caching
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user