[Rails] 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
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/311822b6-4a6a-40f3-892b-3b57ec481d5d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home