mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Take a stab at documenting AMS support.
Specifically when used in objects that are not ActiveRecord objects.
This commit is contained in:
parent
6780cd3df5
commit
d0ab0ccc97
@ -45,6 +45,14 @@ the serializer generator:
|
|||||||
$ rails g serializer post
|
$ rails g serializer post
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Support for PORO's and other ORM's.
|
||||||
|
|
||||||
|
Currently `ActiveModel::Serializers` adds serialization support to all models
|
||||||
|
that descend from `ActiveRecord`. If you are using another ORM or if you are
|
||||||
|
using objects that are `ActiveModel` compliant, but do not descend from
|
||||||
|
`ActiveRecord`. You must add an include statement for
|
||||||
|
`ActiveModel::SerializerSupport`.
|
||||||
|
|
||||||
# ActiveModel::Serializer
|
# ActiveModel::Serializer
|
||||||
|
|
||||||
All new serializers descend from ActiveModel::Serializer
|
All new serializers descend from ActiveModel::Serializer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user