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>
</tr>
<% end%>
</table>
<%= will_paginate @list%>
<% end%>
i use
rails 2.3.2
jruby 1.3.1
will_paginate 2.2.2
thank you
--
Posted via http://www.ruby-forum.com/.
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. On Nov 3, 3:19 am, Yazu Yazu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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> > </tr> > <% end%> > </table> > <%= will_paginate @list%> > <% end%> > > i use > rails 2.3.2 > jruby 1.3.1 > will_paginate 2.2.2 > > thank you > -- > Posted viahttp://www.ruby-forum.com/.
provide demo using ajax paginate: http://www.box.net/shared/rufuee2ldm 2009/11/3 Rick <richard.t.lloyd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > 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. > > On Nov 3, 3:19 am, Yazu Yazu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > 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> > > </tr> > > <% end%> > > </table> > > <%= will_paginate @list%> > > <% end%> > > > > i use > > rails 2.3.2 > > jruby 1.3.1 > > will_paginate 2.2.2 > > > > thank you > > -- > > Posted viahttp://www.ruby-forum.com/. > > >-- tommy xiao E-mail: xiaods(AT)gmail.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---