From: Peter Fitzgibbons Date: 2005-03-29T02:31:35+09:00 Subject: [RAILS] 0.11.1 pagination not updating @items ------_=_NextPart_001_01C533BB.F01208B3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I have pagination set up on my controller. View template list.html and def list end on the controller. :per-page = =3D 20 Browsing the template works, pagination page selector updates appropriately to the page=3D 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 model :excel_commission =09 scaffold :excel_commission paginate :excel_commissions, :order_by =3D> 'file_name, row_id', :per_page =3D> 20 def list end end 8< 8< 8< excel_commission_controller.rb 8< 8< 8< >8 >8 >8 list.rhtml >8 >8 >8=20 Excel Data <%=3D render_partial "paginator_navigate", @excel_commission_pages %>
<%=3D render_partial "paginator_display", @excel_commission_pages %>
<% @excel_commissions.each do |@item| %> <%=3D @item.file_name %><%=3D @item.row_id %>
<% end %> =20 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=20 ------_=_NextPart_001_01C533BB.F01208B3--