plugin in rails · RubyonRails

Will Paginate — Plugin

Will Paginate:

1. Installation:

cmd>git clone 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


b. DB has 100 records

c. controller:

def productlist
@products = Product.paginate :page => params[:page]

d. productlist.hml.erb

<%= will_paginate @products %>

<% @products.each do |c| %>
<li><%= %> – <%= %> – <%= c.price %> – <%=
c.description %></li>
<% end %>

Output looks Like:

Links for more help –>


2 thoughts on “Will Paginate — Plugin

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s