Will_paginate pagination problem

hi;

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
pages
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">
        <%=
        l.CODE
      %>
      </td>
<% 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
http://wiki.github.com/mislav/will_paginate
for use instructions.

provide demo using ajax paginate:

http://www.box.net/shared/rufuee2ldm

2009/11/3 Rick [email protected]

http://wiki.github.com/mislav/will_paginate

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


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