I made a new pagination
Usage
At first, include the module into your model class.
1 class Post 2 include PaginationScope
By this, the scope named "paginate" is made.
And then, in the controller
1 class PostsController < Applicatio nControlle r 2 def index 3 @posts = Post.not_delete d.paginate(params[:page], 10)
Finally, the pagination
1 <%= paginate @posts %>
Have fun!
posted by
takiuchi
on Sat 16 Aug 2008
at 23:58