public
Description: This is a rails plugin module for mixing in pagination function.
Homepage: http://blog.s21g.com/articles/788
Clone URL: git://github.com/genki/pagination_scope.git
name age message
file .gitignore Thu Jan 22 09:30:45 -0800 2009 Added spec task. [genki]
file .rake_tasks Thu Aug 14 05:33:17 -0700 2008 First commit. [genki]
file ChangeLog Sat Sep 27 11:49:16 -0700 2008 Updated version [genki]
file README Thu Aug 14 06:05:43 -0700 2008 Updated README [genki]
file Rakefile Fri Mar 20 22:10:13 -0700 2009 Updated rubyforge project name. [genki]
directory lib/ Wed Apr 01 09:19:30 -0700 2009 Fixed a bug of which the count method couldn't ... [genki]
file pagination_scope.gemspec Wed Apr 01 09:19:30 -0700 2009 Fixed a bug of which the count method couldn't ... [genki]
directory rails/ Fri Mar 20 23:36:22 -0700 2009 Bumped version [genki]
directory spec/ Wed Apr 01 09:19:30 -0700 2009 Fixed a bug of which the count method couldn't ... [genki]
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::