README.md in captive-api-1.2.0 vs README.md in captive-api-1.2.1
- old
+ new
@@ -25,9 +25,34 @@
| Nom du concern | Description |
|:-----|:--------:|
| [pagination](https://github.com/Captive-Studio/captive-api/blob/main/app/controllers/concerns/api/pagination_concern.rb) | Logique de pagination pour les index |
| [render error](https://github.com/Captive-Studio/captive-api/blob/main/app/controllers/concerns/api/render_error_concern.rb) | Attrape certaines erreurs pour retourner une page d'erreur en json. Permet aussi d'utiliser les méthodes pour rendre des pages d'erreur json manuellement |
+### PaginationConcern
+
+#### `#pagination`
+
+You can use the pagination method like this :
+
+```ruby
+@tenues = @tenues.page(pagination[:page])
+ .per(pagination[:per_page])
+```
+
+*The method `page` and `per` come from [will_paginate](https://github.com/mislav/will_paginate)*
+
+The pagination method return an hash like this :
+
+```ruby
+{ page: 1, per_page: 10 }
+```
+
+⚠️ The first page is `1` and not `0` !
+
+### RenderErrorConcern
+
+TODO
+
## Installation
Add this line to your application's Gemfile:
```ruby
gem "captive-api"