Consistently refer to the 'JSON API' and the 'JsonApi' adapter

This commit is contained in:
Benjamin Fleischer
2015-09-04 04:28:10 -05:00
parent ee40e9fcef
commit 0091be89f8
5 changed files with 20 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ Doesn't follow any specifc convention.
It also generates a json response but always with a root key. The root key **can't be overridden**, and will be automatically defined accordingly to the objects being serialized.
Doesn't follow any specifc convention.
### JSONAPI
### JSON API
This adapter follows **version 1.0** of the format specified in
[jsonapi.org/format](http://jsonapi.org/format). It will include the associated

View File

@@ -1,12 +1,15 @@
# How to add pagination links
### JSON-API adapter
### JSON API adapter
Pagination links will be included in your response automatically as long as the resource is paginated and if you are using a ```JSON-API``` adapter.
Pagination links will be included in your response automatically as long as
the resource is paginated and if you are using the ```JsonApi``` adapter.
If you want pagination links in your response, use [Kaminari](https://github.com/amatsuda/kaminari) or [WillPaginate](https://github.com/mislav/will_paginate).
If you want pagination links in your response, use [Kaminari](https://github.com/amatsuda/kaminari)
or [WillPaginate](https://github.com/mislav/will_paginate).
###### Kaminari examples
```ruby
#array
@posts = Kaminari.paginate_array([1, 2, 3]).page(3).per(1)