skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

September 21, 2008
Posted by roadburn

Rails Pagination

From :

http://github.com/mislav/will_paginate/tree/master

Installation

1
$script/plugin install git://github.com/mislav/will_paginate.git

Usage

@posts = Post.paginate :page => params[:page], :order => 'created_at DESC'
 
#In the view, page links can be rendered with a single view helper:
<%= will_paginate @posts %>

Leave a comment

Posted Under Rails

No Comments Yet

You can be the first to comment!

Leave a comment

* = Required

  • CATEGORIES
    • Coding Tips
    • ExtJS 4
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Ubuntu
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS