Clarify README wrt POROs

Closes #556.
This commit is contained in:
Steve Klabnik 2014-08-22 14:52:39 -04:00
parent 5cb0875286
commit 3c124e8ce5

View File

@ -68,9 +68,11 @@ $ rails g serializer post
### Support for POROs
Currently `ActiveModel::Serializers` expects objects to implement
read\_attribute\_for\_serialization. That's all you need to do to have
your POROs supported.
The PORO should include ActiveModel::SerializerSupport. That's all you need to
do to have your POROs supported.
For Rails versions before Rails 4 ActiveModel::Serializers expects objects to
implement `read_attribute_for_serialization`.
# render :json