Add PORO serializable base class: ActiveModelSerializers::Model

This commit is contained in:
Benjamin Fleischer
2015-10-09 00:19:03 -05:00
parent 526b56e9a6
commit 124faaa829
10 changed files with 85 additions and 43 deletions

View File

@@ -374,6 +374,13 @@ class PostSerializer < ActiveModel::Serializer
end
```
## Serializing non-ActiveRecord objects
All serializable resources must pass the ActiveModel::Serializer::Lint::Tests.
See the ActiveModelSerializers::Model for a base class that implements the full
API for a plain-old Ruby object (PORO).
## Getting Help
If you find a bug, please report an [Issue](https://github.com/rails-api/active_model_serializers/issues/new).