genki / pagination_scope

This is a rails plugin module for mixing in pagination function.

This URL has Read+Write access

genki (author)
Fri Mar 20 23:36:22 -0700 2009
commit  0dcdc4f0bb8dce3b1f015ef59d52e0d02d9a38c9
tree    000c8840caf6b46cec52fd68e30b282ea636fba6
parent  fd78897ee525f664d6a64f379dcf6536b722fadd
README
= pagination_scope

This is a rails plugin module for mixing in pagination function.

== Description

This library is suitable to use together with complicated named_scope which has
:joins options.  You can use the WillPaginate for ordinary case of pagination.

== Installation

=== Archive Installation

  rake install

=== Gem Installation

  gem install pagination_scope


== Features/Problems


== Synopsis

In your model class,

  class Post
    include PaginationScope

In your controller class,

  class PostsController < ApplicationController
    def index
      @posts = Post.not_deleted.paginate(params[:page], 10)

In your view html.erb,

  <%= paginate @posts %>


== Copyright

Author::    Genki Takiuchi <genki@s21g.com>
Copyright:: Copyright (c) 2008 Genki Takiuchi
License::