Skip to content

genki/dm-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A pagination plugin for DataMapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages