Will_paginate and full text search with MongoID

Hi,

I get undefined method `paginate’ for
#<Mongoid::Contextual::TextSearch
if I try to paginate a full text
search.
Using mongoid (4.0.0.alpha1) and will_paginate_mongoid (2.0.1)

@ads = Ad.text_search( params[:q] )
.paginate(:page => params[:page], :per_page => 10 )

It does however work nice if I don’t do a search. E.g.:

Ad.paginate(:page => params[:page])

Any suggestions to how full text search and will paginate can play
together?

Cheers,
Martin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs