title: Using searchlogic with will_paginate
body: <p><strong>EDIT</strong> Looks like I figured it out - I had to call paginate after the call to <code>all</code> from Searchlogic.</p>
  
  <p>I'm trying to use both of these tools to enable users to search contacts and return a paginated list (or the entire paginated list if they don't enter any search criteria).  However I'm unsure of the proper way to chain them together, and what I'm trying is giving me errors.</p>
  
  <p>Here is my controller:</p>
  
  <pre><code>class ContactsController &lt; ApplicationController
    def index
      @search = Contact.search(params[:search]).paginate(:page =&gt; params[:page])
      @contacts, @contacts_count = @search.all, @search.count
    end
  end
  </code></pre>
  
  <p>This gives me the error <code>Undefined method 'all' for WillPaginate</code>.  Removing the all gives me an error because the view is looking for a path that has the word "contact" 20 times (e.g. <code>contact_contact_contact..._path</code>), presumably because the default "per page" is 20.</p>
  
  <p>What am I doing wrong?  I would like to have searching, ordering and pagination all on this page.</p>