Skip to content

Commit d39dd04

Browse files
AlexVPopovYohan Robert
authored and
Yohan Robert
committed
Update SerializableResource documentation (#1977)
Mention that ActiveModelSerializers::SerializableResource.new can be used for single resource as well as for collections
1 parent d31d741 commit d39dd04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/howto/outside_controller_use.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ serializable_resource = ActiveModelSerializers::SerializableResource.new(post, o
1919
# Convert your resource into json
2020
model_json = serializable_resource.as_json
2121
```
22+
The object that is passed to `ActiveModelSerializers::SerializableResource.new` can be a single resource or a collection.
2223

2324
### Looking up the Serializer for a Resource
2425

0 commit comments

Comments
 (0)