Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A pagination plugin for DataMapper.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
test
.gitignore
LICENSE
README
Rakefile
TODO
dm-pagination.gemspec

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
Something went wrong with that request. Please try again.