title: NoMethodError in will paginate
body: <p>I have written this in my controller:</p>
  
  <pre><code> def index
      @invoices = Invoice.paginate(:page =&gt; params[:page], :per_page =&gt; 3)
      @invoices = Invoice.all(:select=&gt;"invoices.id, invoices.invoice_name, 
                                       invoices.invoice_number, invoices.invoice_date,
                                       invoices.invoice_sent, invoices.current_eta, 
                                       invoices.invoice_status, invoices.invoice_amount, 
                                       projects.project_name, clients.client_name, 
                                       companies.company_name, currencies.symbol as invoice_symbol", 
  
      :joins =&gt; "left outer join projects on invoices.project_id = projects.id
                 left outer join clients on projects.client_id = projects.id
                 left outer join currencies on currencies.id = projects.currency_id
                 left outer join companies on clients.company_id = companies.id",
      :order =&gt;"invoice_name desc")
  
      if @invoices.blank?
        flash[:notice] = "There are no Invoices defined. You can create them by clicking 'New Invoice'"
      end
      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @invoices }
      end
    end
  </code></pre>
  
  <p>In my views file I have writte this:</p>
  
  <pre><code>  &lt;div class="digg_pagination"&gt;
      &lt;div clas="page_info"&gt;
        &lt;%= page_entries_info @invoices %&gt;
      &lt;/div&gt;
      &lt;%= will_paginate @invoices, :container =&gt; false %&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>But I am getting this error:</p>
  
  <pre><code>NoMethodError in Invoices#index
  
  Showing /home/icicle/work/code/invoiced/app/views/invoices/_list.html.erb where line #59 raised:
  
  undefined method `total_pages' for #&lt;Array:0xbdfb708&gt;
  
  Extracted source (around line #59):
  
  56: &lt;/table&gt;
  57:   &lt;div class="digg_pagination"&gt;
  58:     &lt;div clas="page_info"&gt;
  59:       &lt;%= page_entries_info @invoices %&gt;
  60:     &lt;/div&gt;
  61:     &lt;%= will_paginate @invoices, :container =&gt; false %&gt;
  62:   &lt;/div&gt;
  </code></pre>
  
  <p>I also tried to change the version of will_paginate gem but still I am getting the same error. Can someone help me out?</p>