{}[http://badge.fury.io/rb/pagers] {}[https://codeclimate.com/github/museways/pagers] {}[https://travis-ci.org/museways/pagers] {}[https://gemnasium.com/museways/pagers]
= Pagers
Inspired in kaminari and will_paginate but more minimalistic.
= Install
Put this line in your Gemfile:
gem 'pagers'
Then bundle:
$ bundle
= Usage
Call the page scope:
@collection = Model.page(1, length: 10, padding: 4)
And in your views just:
<%= paginate @collection %>
= Configuration
== Defaults
If you want to change defaults you can override the values in the helper:
<%= paginate @collection, parameter: :p, pages: 3 %>
Or to set them globally in your application.rb:
config.pagers.parameter = :p
config.pagers.pages = 3
config.pagers.length = 5
config.pagers.padding = 0