# Using will\_paginate

**URL:** <https://www.ruby-forum.com/t/using-will-paginate/177713>\
**Category:** Rails\
**Created:** [October 22, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/using-will-paginate/177713 "2009-10-22T14:48:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michbukana](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Post date:** [October 22, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/using-will-paginate/177713/1 "2009-10-22T14:48:25Z")

</div>

Hello,

I have installed will\_paginate gem for my application, but it is not  
working properly. This is the code in clients\_controller.rb:

def index  
@clients = Client.paginate :page =\> params[:page], :per\_page =\> 5  
end

and the code in clients/index.html.erb:

\<%= will\_paginate @clients %\>

The problem is I don’t see any client specification. The pagination is  
working fine, there are 13 recorded clients in the database and it shows  
3 pages total.

Just in case, I’m using rails 2.3.4 and will\_paginate 2.3.11 (latest  
version from github).

---

<div class="post-metadata">

**Author:** ![michbukana](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Post date:** [October 22, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/using-will-paginate/177713/2 "2009-10-22T14:59:43Z")

</div>

On Oct 22, 1:48 pm, Eduardo B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> working fine, there are 13 recorded clients in the database and it shows  
> 3 pages total.

All that snippet is supposed to do is display the pagination links -  
you still need to iterate over @clients and render the html for each  
one.

Fred
