links doc

This commit is contained in:
mnauage 2018-03-13 10:48:05 -04:00 committed by Shishir Kakaraddi
parent ecd7bbc793
commit 1e6d127aec

View File

@ -211,6 +211,11 @@ Support for top-level included member through ` options[:include] `.
```ruby
options = {}
options[:meta] = { total: 2 }
options[:links] = {
self: '...',
next: '...',
prev: '...'
}
options[:include] = [:actors]
MovieSerializer.new([movie, movie], options).serialized_json
```
@ -219,6 +224,11 @@ MovieSerializer.new([movie, movie], options).serialized_json
```ruby
options[:meta] = { total: 2 }
options[:links] = {
self: '...',
next: '...',
prev: '...'
}
hash = MovieSerializer.new([movie, movie], options).serializable_hash
json_string = MovieSerializer.new([movie, movie], options).serialized_json
```