Will_paginate pagination problem


i use will_paginate the first page come true but all other page get the
same data of first page i checked in controller “page” parameter works
true but paginate get only first page’s data and shows these data in all
forexample first page seen A,B second page also seen A,B but second page
must be C,D
my code is;

controller :

@list = Company::Env.paginate :page => params[:page],:conditions =>
[‘CODE = ?’, code], :per_page => 2

view :

<%if @list != nil and @list.size != 0%>
<% for l in @list%>

    <tr class="table-row" >
      <td class="collection-table-text">
<% end%> <%= will_paginate @list%> <% end%>

i use
rails 2.3.2
jruby 1.3.1
will_paginate 2.2.2

thank you

You should replace your will_paginate gem, it’s obsolete.

  1. gem uninstall will_paginate
  2. gem install gemcutter
  3. gem tumble
  4. gem install will_paginate

This will give you will_paginate (2.3.11) which is equivalent to
mislav-will_paginate. Refer to
for use instructions.

provide demo using ajax paginate:


2009/11/3 Rick [email protected]


must be C,D
<% for l in @list%>
<%= will_paginate @list%>

tommy xiao
E-mail: xiaods(AT)gmail.com