title: will_paginate with search function is not working in ruby on rails
body: <p>I am trying to search my posts item with pagination. I am doing like this..</p>
  
  <pre><code>@posts = Post.search(params[:search]).paginate(page: params[:page],:per_page =&gt; 5)
  </code></pre>
  
  <p>But it showing <strong>NoMethodError</strong></p>
  
  <pre><code>undefined method `paginate' for #&lt;Array:0x9a93f08&gt;
  </code></pre>
  
  <p>I don't know where i am wrong. Please help</p>