mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
add support of mongoid collection serialization
This commit is contained in:
12
README.md
12
README.md
@@ -48,10 +48,14 @@ $ 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`.
|
||||
that descend from `ActiveRecord` or include `Mongoid::Document`. If you are
|
||||
using another ORM, or if you are using objects that are `ActiveModel`
|
||||
compliant but do not descend from `ActiveRecord` or include
|
||||
`Mongoid::Document`, you must add an include statement for
|
||||
`ActiveModel::SerializerSupport` to make models serializable. If you
|
||||
also want to make collections serializable, you should include
|
||||
`ActiveModel::ArraySerializationSupport` into your ORM's
|
||||
relation/criteria class.
|
||||
|
||||
# ActiveModel::Serializer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user