Take the 2-minute tour ×  I am trying to integrate
jQuery.pageless plugin in my application, but in vain. Can
anyone provide me with some resource that shows a Rails 3 demo
application that has jQuery.pageless working?  I tried looking
into the example application that is provided with the plugin,
which is in Rails 2.2. I tried to implement everything in a
similar manner, but I get the error undefined method
'total_pages' for Array <....>, which is the array of one of my
models.  Here's the code snippets:  module ApplicationHelper
def pageless(total_pages, url=nil, container=nil)     opts = {
:totalPages => total_pages,       :url        => url,
:loaderMsg  => 'Loading more results'      container &&
opts[:container] ||= container    def index   @posts = Post.all
if request.xhr?     sleep(3) # make request a little bit slower
to see loader :-)     render :partial => "shared/post",
:collection => @posts   <div id="recent-sale-item-area">   <% if
!@posts.nil? %>     <p id="recent-posts"> recent