Sha256: 1492ab6235d6ed7c0e08a3ff3c9f67c37b2311bcddf25b76788c0085717fd0bb

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 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)

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

1 entries across 1 versions & 1 rubygems

Version Path
pagers-3.0.0 README.rdoc