title: Rails will_paginate and ajax append pages
body: <p>I'm using the will_paginate gem with ajax to append the next page to the bottom of my index every time the user clicks "more" - the problem I'm noticing is that past the second page, clicking more just appends the second page again - what am i missing? </p>
  
  <p><strong>index.html.erb</strong></p>
  
  <pre><code>&lt;ul class="items" id="event-index"&gt;
  &lt;%= render 'events' %&gt;
  &lt;/ul&gt;
  &lt;%= will_paginate @events, :previous_label =&gt; '', :next_label =&gt; 'More', :remote =&gt; true %&gt;
  </code></pre>
  
  <p><strong>index.js.erb</strong></p>
  
  <pre><code>$('#event-index').append('&lt;%= escape_javascript(render("events")) %&gt;');
  
  &lt;% if @events.total_pages == @events.current_page %&gt;
      $('.pagination').remove();
  &lt;% end %&gt;
  &lt;% if @events.current_page %&gt;
      $('.ajaxload').hide();
  &lt;% end %&gt;
  </code></pre>