title: mongoid , will_paginate , sorting doesnt work with Mongoid criteria DSL
body: <p>According to the readme of mongoid on github i can do fancy queries like 
  Person.select(:first_name, :last_name).where(:title => "Sir").skip(10).limit(10).paginate</p>
  
  <p>i tried this in combination with will_paginate (3.0.pre2)</p>
  
  <pre><code>@companies = Company.paginate(:per_page=&gt;5, :page=&gt;params[:page], :sort =&gt; [sort_column, sort_direction])
  </code></pre>
  
  <p>---> works fine</p>
  
  <pre><code>@companies = Company.all.paginate(:per_page=&gt;5, :page=&gt;params[:page], :sort =&gt; [sort_column, sort_direction])
  </code></pre>
  
  <p>---> sorting doesnt work anymore</p>
  
  <p>i tried </p>
  
  <pre><code>@companies = Company.where(:name=&gt;/^#{params[:search]}/).paginate( :per_page=&gt;5, :page=&gt;params[:page], :sort =&gt; [sort_column, sort_direction])
  </code></pre>
  
  <p>--> doesnt work</p>
  
  <p>then </p>
  
  <pre><code>@companies = Company.paginate(:conditions=&gt;{:name=&gt;/^#{params[:search]}/}, :per_page=&gt;5, :page=&gt;params[:page], :sort =&gt; [sort_column, sort_direction])
  </code></pre>
  
  <p>---> works</p>
  
  <p>But i think search functions should be in the model not in the controller! ?</p>