mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Merge pull request #173 from jacortinas/document_ams_support_include
Document adding serializer support to normal Ruby classes and other ORM's.
This commit is contained in:
commit
09dbace891
@ -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