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:
Steve Klabnik 2012-12-20 11:40:51 -08:00
commit 09dbace891

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