This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Feb 08 22:46:47 -0800 2009 | |
| |
LICENSE | Tue Jan 13 23:15:02 -0800 2009 | |
| |
README | Sun Mar 22 05:23:20 -0700 2009 | |
| |
Rakefile | ||
| |
TODO | Tue Jan 13 23:15:02 -0800 2009 | |
| |
dm-pagination.gemspec | ||
| |
lib/ | ||
| |
spec/ | ||
| |
test/ | Tue Jan 13 23:15:02 -0800 2009 |
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








