# Paging in ror

**URL:** <https://www.ruby-forum.com/t/paging-in-ror/173481>\
**Category:** Rails\
**Created:** [August 10, 2009, 11:27am UTC](https://www.ruby-forum.com/t/paging-in-ror/173481 "2009-08-10T11:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 10, 2009, 11:27am UTC](https://www.ruby-forum.com/t/paging-in-ror/173481/1 "2009-08-10T11:27:32Z")

</div>

hello all,

any one known how to do paging in ror

---

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 10, 2009, 1:20pm UTC](https://www.ruby-forum.com/t/paging-in-ror/173481/2 "2009-08-10T13:20:07Z")

</div>

Wap A. wrote:

> hello all,
> 
> any one known how to do paging in ror

there is a wonderful plugin called “will\_paginate”. Installation is  
simple,

1. copy the plugin to your plugin folder.
2. use - require “will\_paginate” in your environment.rb

start using it in your view like this

## view:

for c in @collection

end

\<% will\_paginate @collection %\>

---

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 10, 2009, 1:37pm UTC](https://www.ruby-forum.com/t/paging-in-ror/173481/3 "2009-08-10T13:37:30Z")

</div>

Rails L. wrote:

> Wap A. wrote:
> 
> > hello all,
> > 
> > any one known how to do paging in ror
> 
> there is a wonderful plugin called “will\_paginate”. Installation is  
> simple,
> 
> 1. copy the plugin to your plugin folder.
> 2. use - require “will\_paginate” in your environment.rb
> 
> start using it in your view like this
> 
> ## view:
> 
> for c in @collection
> 
> end
> 
> \<% will\_paginate @collection %\>

i was followed your step but i got will\_paginate undefined method  
`will\_paginate’ for #ActionView::Base:0x46d0098 my code is below

# Listing images

\<% for image in @images %\>

\<% end %\>

| Name |
| --- |
| \<%=h image.name %\> | \<%= image\_tag image.name,:alt =\>image.name,:size=\>'100x100'%\> | \<%= link\_to 'Show', image %\> | \<%= link\_to 'Edit', edit\_image\_path(image) %\> | \<%= link\_to 'Destroy', image, :confirm =\> 'Are you sure?', :method =\> :delete %\> |

  
\<% will\_paginate @images %\> \<%= link\_to 'New image', new\_image\_path %\>

---

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 10, 2009, 1:45pm UTC](https://www.ruby-forum.com/t/paging-in-ror/173481/4 "2009-08-10T13:45:25Z")

</div>

Hi

```
please read the example usage here at home

```

> **[GitHub - mislav/will\_paginate: Pagination library for Rails and other Ruby...](https://github.com/mislav/will_paginate/tree/master)**
>
> master

Sijo
