title: undefined method `page' for nil:NilClass, paginate_with_kaminari
body: <p>I am using paginate_with_kaminari gem for implementing pagination in my rails application. Sometimes I get this error "undefined method `page' for nil:NilClass".</p>
  
  <pre><code>@notifications = paginate current_user.push_records.where(:n_status.in =&gt; [PushRecord::N_STATUS[:NEW_REGISTERED],PushRecord::N_STATUS[:UNINSTALLED]]).to_a , per_page: 20
  </code></pre>
  
  <p>In the above code, params[:page] will be present which contains page number which has to be fetched.</p>