hiii all i am new to ruby on rails. i am facing a problem with pagination. i have a page on which i have three partial and all have pagination. if i click on one partial''s next page it will update all the three partial to second page. Please help me to solve this problem. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
one way would be to only update one of your partials using ajax. another way would be to post your code here... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
MaD wrote:> one way would be to only update one of your partials using ajax. > > another way would be to post your code here...I m using ajax pagination. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
well then there has to be some error in your code. look at your targets. you have to specify the correct div/container to update. that way only one of your partials will turn to the next page. On 23 Dez., 14:03, Nihil Chauhan <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> MaD wrote: > > one way would be to only update one of your partials using ajax. > > > another way would be to post your code here... > > I m using ajax pagination. > -- > Posted viahttp://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
<%= will_paginate @category_history,:renderer=>''RemoteLinkRenderer'',:remote=>{:with=>''value'',:update=>''category_history''}%> i want to send an id with this will_paginate which i can get in controller and check for which one div i have to update. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
i don''t think this will work. why don''t you just specify which div to update, depending on which pagination has been clicked (on the client side) and make your call accordingly? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
MaD wrote:><%= will_paginate >@category_history,:renderer=>''RemoteLinkRenderer'',:remote=>>{:with=>''value'',:update=>''category_history''}%> > i don''t think this will work. why don''t you just specify which div to > update, depending on which pagination has been clicked (on the client > side) and make your call accordingly?I have faced the same type of problem. <%= will_paginate @posts,:renderer=>''RemoteLinkRenderer'',:remote=>>{:with=>''value1'',:update=>''postsDivId''}%> in the the Post list is in the postDivId div. But it will show the whole page in the div when I click the next page link. I have tried with partial with when I use the code in index.html.erb <div id="container"> <%= render :partial => ''contents'' %> </div> Partial view: _contents.html.erb <%= will_paginate @collection, :renderer => ''RemoteLinkRenderer'', :remote => {:update => ''container''} %> in controller the index action : respond_to do |format| format.html { render :partial => ''container'' } format.xml { render :xml => @posts } end It just show only the partial not the total page with the partial display. Please help me -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---