public
Description: A pagination plugin for DataMapper.
Homepage: http://merbi.st/plugins/8
Clone URL: git://github.com/genki/dm-pagination.git
name age message
file .gitignore Sun Feb 08 22:46:47 -0800 2009 add *~ to gitignore [orepuri]
file LICENSE Tue Jan 13 23:15:02 -0800 2009 First commit [genki]
file README Sun Mar 22 05:23:20 -0700 2009 Cleanup and order paramater! * Pagination shou... [krunaldo]
file Rakefile Loading commit data...
file TODO Tue Jan 13 23:15:02 -0800 2009 First commit [genki]
file dm-pagination.gemspec
directory lib/
directory spec/
directory test/ Tue Jan 13 23:15:02 -0800 2009 First commit [genki]
README
dm-pagination
=============

A plugin for the Merb framework that provides pagination for DataMapper.

USAGE:

  In your controller,

  class Posts
    def index
      @posts = Post.paginate(:page => params[:page])
    end

  In your view,

  <ul>
  <% @posts.each do |post| %>
    <li><%= h(post.body) %></li>
  <% end %>
  </ul>
  <%= paginate @posts %>

Paramaters:
:order = same paramaters as the :order in a normal DM call
  (http://datamapper.org/doku.php?id=docs:finders&s[]=order#order)

:per_page = Number of items per page

:page = What page number