# Will Paginate problem

**URL:** <https://www.ruby-forum.com/t/will-paginate-problem/129969>\
**Category:** Rails\
**Created:** [February 23, 2008, 7:11am UTC](https://www.ruby-forum.com/t/will-paginate-problem/129969 "2008-02-23T07:11:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rustam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rustam](https://www.ruby-forum.com/u/rustam)\
**Post date:** [February 23, 2008, 7:11am UTC](https://www.ruby-forum.com/t/will-paginate-problem/129969/1 "2008-02-23T07:11:03Z")

</div>

in order to use will paginate i have update my rails app from 1.2.3 to  
1.2.6  
but i have the same pagination problem when i was use rails 1.2.3 that  
page counted normaly ,but it showes all records on the same page  
this is the code in my admin\_controller:  
def list  
@exams = Exam.paginate :page =\> params[:page], :per\_page =\> 10  
end  
this is in my view  
\<%=will\_paginate @exams%\>  
pleas help me .

---

<div class="post-metadata">

**Author:** ![rustam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rustam](https://www.ruby-forum.com/u/rustam)\
**Post date:** [February 24, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/will-paginate-problem/129969/2 "2008-02-24T21:48:05Z")

</div>

I have used will\_paginate with Rails 1.2.3, 1.2.6, and 2.0.2. See if  
adding ‘:all’ does anything for you:

@exams = Exam.paginate(:all,  
:page =\>  
params[:page],  
:per\_page =\> 10)

I assume that you have more than 10 exam records. If this doesn’t  
help, please provide any log info that might help.

-Kyle

On Feb 23, 12:11 am, Rustam M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rustam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rustam](https://www.ruby-forum.com/u/rustam)\
**Post date:** [February 25, 2008, 3:17am UTC](https://www.ruby-forum.com/t/will-paginate-problem/129969/3 "2008-02-25T03:17:39Z")

</div>

i have added :all ,and it works .actually i have done it on view side  
before you mention it ,this was my mistake .thanks
