mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
parent
5cb0875286
commit
3c124e8ce5
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user