Sha256: 097297f4d8b345f60532c54fea2ebdab356d5294c6855dcc306e92e8602685e3

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

{<img src="https://badge.fury.io/rb/pagers.png" alt="Gem Version" />}[http://badge.fury.io/rb/pagers] {<img src="https://codeclimate.com/github/museways/pagers.png" />}[https://codeclimate.com/github/museways/pagers] {<img src="https://travis-ci.org/museways/pagers.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/pagers] {<img src="https://gemnasium.com/museways/pagers.png" alt="Dependency Status" />}[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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pagers-3.0.2 README.rdoc
pagers-3.0.1 README.rdoc