Skip to content

Commit f61e3ea

Browse files
committed
Merge pull request #73 from mihaiionescu/master
Update README.md
2 parents 112a9f4 + d6394c1 commit f61e3ea

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ expose :contact_info do
110110
end
111111
```
112112

113+
#### Collection Exposure
114+
115+
Use `root(plural, singular = nil)` to expose an object or a collection of objects with a root key.
116+
117+
```ruby
118+
root 'users', 'user'
119+
expose :id, :name, ...
120+
```
121+
113122
#### Runtime Exposure
114123

115124
Use a block or a `Proc` to evaluate exposure at runtime. The supplied block or

0 commit comments

Comments
 (0)