Sha256: 1c39b9b0e95a717d154276c438690f60e72c79093a46f22cfc0b1416b0973a40

Contents?: true

Size: 988 Bytes

Versions: 2

Compression:

Stored size: 988 Bytes

Contents

= SimplePagination

A simple Ruby module which encapsulates general purpose pagination logic.  This 
won't limit your database queries or cook pancakes for you, but it will save you
from rewriting pagination code all over the place.

There are already some great pagination libraries for Rails/ActiveRecord which
limit database queries etc (see http://github.com/mislav/will_paginate).  The goal
here is to provide generic pagination logic for times when a full-stack library
would be inappropriate or just overkill -- for example, when paginating results
from calls to a remote API.

== Basic Usage

 require 'rubygems'
 require 'simple_pagination'
 
 class MyResultSet
   include SimplePagination
   def pages
     PageCollection.new(:current_page => 1, :page_size => 10, :total => 59389)
   end
 end

See SimplePagination::PageCollection for more info.

== Copyright

Copyright (c) 2009 Taylor Barstow.  This code is licensed under the MIT license.  
See the LICENSE file for details.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taylorbarstow-simple_pagination-0.1.1 README.rdoc
taylorbarstow-simple_pagination-0.1.2 README.rdoc