title: Multiple pagination with kaminari via Ajax
body: <p>I want to apply multiple pagination with Kaminari via Ajax now here is my code for controller </p>
  
  <pre><code>def user_note
      @user = current_user
      @notes = Bookmark.where('user_id = ? &amp;&amp; note is not NULL',current_user.id).order('created_at DESC').page(params[:page_1]).per(4)
  
      @bookmarks = Bookmark.where('user_id = ? &amp;&amp; note is NULL',current_user.id).order('created_at DESC').page(params[:page_2]).per(4)
  
      respond_to do |format|
        format.html
        format.xml{ render :xml =&gt; @user}
      end   end
  </code></pre>
  
  <p>now for views i have two partials to render this arrays</p>
  
  <pre><code>&lt;div id="bookmarks"&gt;
  &lt;%= render :partial =&gt;"users/bookmark",:locals =&gt; { :bookmark =&gt; @bookmarks} %&gt;
              &lt;/div&gt;
  &lt;%= paginate @bookmarks,:remote =&gt; true, :param_name =&gt; 'page' %&gt;
  </code></pre>
  
  <p>inner partial is </p>
  
  <pre><code>&lt;% bookmark.each do |bookmar| %&gt;
    &lt;%= render :partial =&gt; 'show_bookmark.html.erb' , :locals =&gt; { :bookma =&gt; bookmar} %&gt;
  &lt;%end%&gt;
  </code></pre>
  
  <p>script for pagination update is being handled in a separate file</p>
  
  <pre><code>$('#bookmarks').html('&lt;%= escape_javascript render(:partial =&gt;"users/bookmark",:locals =&gt; { :bookmark =&gt; @bookmarks}) %&gt;');
  $('#paginator').html('&lt;%= escape_javascript(paginate(@bookmarks, :remote =&gt; true).to_s) %&gt;');
  </code></pre>
  
  <p>But by doing every thing it is not updating to state of page neither the contain in the page. </p>