README.md in paginate-responder-1.1.1 vs README.md in paginate-responder-1.2.0
- old
+ new
@@ -1,6 +1,6 @@
-# Paginate::Responder [![Build Status](https://travis-ci.org/jgraichen/paginate-responder.png?branch=master)](https://travis-ci.org/jgraichen/paginate-responder)
+# Paginate::Responder [![Build Status](https://travis-ci.org/jgraichen/paginate-responder.png?branch=master)](https://travis-ci.org/jgraichen/paginate-responder) [![Code Climate](https://codeclimate.com/github/jgraichen/paginate-responder.png)](https://codeclimate.com/github/jgraichen/paginate-responder)
A Rails pagination responder with link header support.
## Installation
@@ -14,12 +14,13 @@
Or install it yourself as:
$ gem install paginate-responder
-You will also need a pagination gem like
-[will_paginate](mislav/will_paginate).
+You will also need a pagination gem. `PaginateResponder` comes with adapters for
+* [will_paginate](https://github.com/mislav/will_paginate) and
+* [kaminari](https://github.com/amatsuda/kaminari).
## Usage
Add `Responders::PaginateResponder` to your responder chain:
@@ -53,17 +54,9 @@
page is first or last page.
Also a `X-Total-Pages` header will be added with the total
number of pages if available. This allows applications
to display a progress bar or similar while fetching pages.
-
-`PaginateResponder` should work with any pagination gem that
-adds a `paginate` method to collections. Tests run with
-[will_paginate](mislav/will_paginate).
-
-The `total_pages` method on the collection will be used as
-total page count. If not total page method is present or
-nil is returned some link header may be missing.
## TODOs
* Documentation
** Controller methods