mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Update SerializableResource documentation (#1977)
Mention that ActiveModelSerializers::SerializableResource.new can be used for single resource as well as for collections
This commit is contained in:
parent
d31d741f43
commit
d39dd04c11
@ -19,6 +19,7 @@ serializable_resource = ActiveModelSerializers::SerializableResource.new(post, o
|
||||
# Convert your resource into json
|
||||
model_json = serializable_resource.as_json
|
||||
```
|
||||
The object that is passed to `ActiveModelSerializers::SerializableResource.new` can be a single resource or a collection.
|
||||
|
||||
### Looking up the Serializer for a Resource
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user