# \[RAILS\] 0.11.1 pagination not updating @items

**URL:** <https://rubytalk.org/t/rails-0-11-1-pagination-not-updating-items/17224>\
**Category:** ruby-talk\
**Created:** [28 March 2005 17:31 UTC](https://rubytalk.org/t/rails-0-11-1-pagination-not-updating-items/17224 "2005-03-28T17:31:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Fitzgibbons1](https://avatars.discourse-cdn.com/v4/letter/p/aca169/32.png) [@Peter\_Fitzgibbons1](https://rubytalk.org/u/Peter_Fitzgibbons1)\
**Post date:** [28 March 2005 17:31 UTC](https://rubytalk.org/t/rails-0-11-1-pagination-not-updating-items/17224/1 "2005-03-28T17:31:35Z")

</div>

Hello,

I have pagination set up on my controller.  
View template list.html and def list end on the controller. :per-page =  
20

Browsing the template works, pagination page selector updates  
appropriately to the page= url parameter, but the records retrieved are  
always the first 20 records of the entire table. It doesn't offset for  
each paginated page?

> 8 \>8 \>8 excel\_commission\_controller.rb \>8 \>8 \>8

class ExcelCommissionController \< ApplicationController  
&nbsp;&nbsp;model :excel\_commission  
&nbsp;&nbsp;  
&nbsp;&nbsp;scaffold :excel\_commission

&nbsp;&nbsp;paginate :excel\_commissions, :order\_by =\> 'file\_name, row\_id',  
&nbsp;&nbsp;:per\_page =\> 20

&nbsp;&nbsp;def list

&nbsp;&nbsp;end

end  
8\< 8\< 8\< excel\_commission\_controller.rb 8\< 8\< 8\<

> 8 \>8 \>8 list.rhtml \>8 \>8 \>8

\<html\>  
&nbsp;&nbsp;\<head\>  
&nbsp;&nbsp;\<title\>Excel Data\</title\>  
&nbsp;&nbsp;\</head\>

&nbsp;&nbsp;\<body\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<%= render\_partial "paginator\_navigate",  
@excel\_commission\_pages %\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<BR\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<%= render\_partial "paginator\_display",  
@excel\_commission\_pages %\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<br\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<% @excel\_commissions.each do |@item| %\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<%= @item.file\_name %\>\<%= @item.row\_id %\>\<br\>  
&nbsp;&nbsp;&nbsp;&nbsp;\<% end %\>  
&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;\</body\>  
\</html\>  
8\< 8\< 8\< list.rhtml 8\< 8\< 8\<

Peter J. Fitzgibbons  
Applications Manager  
Lakewood Homes - "The American Dream Builder"(r)  
Peter.Fitzgibbons@Lakewoodhomes.net  
(847) 884-8800
