Will Paginate:
1. Installation:
cmd>git clone git://github.com/mislav/will_paginate.git
2. Git Installation
You don’t have git installed already then install it
Install git from here.
3. Try with this Basic Code:
a. Product model(products Table) contains these fields
id
name
price
description
b. DB has 100 records
c. controller:
def productlist
@products = Product.paginate :page => params[:page]
end
d. productlist.hml.erb
<%= will_paginate @products %>
<ul>
<% @products.each do |c| %>
<li><%= c.id %> – <%= c.name %> – <%= c.price %> – <%=
c.description %></li>
<% end %>
</ul>
Output looks Like:
Links for more help –> http://agilewebdevelopment.com/plugins/will_paginate