Take a stab at documenting AMS support.

Specifically when used in objects that are not ActiveRecord objects.
This commit is contained in:
Jose Angel Cortinas 2012-12-17 17:13:45 -06:00
parent 6780cd3df5
commit d0ab0ccc97

View File

@ -45,6 +45,14 @@ the serializer generator:
$ 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
All new serializers descend from ActiveModel::Serializer