Because will_paginate does not support mongoid skip
and limit
methods.
They just supports paginate
method in Array
class. So what it means?
Will_Paginate, find all objects and after that cut the needed objects.
It can cause performance problems when you have a lot of objects.
In your Gemfile
use gem "will_paginate_mongoid"
and run bundle install
or
Just run gem install will_paginate_mongoid
It just create a paginate
method compatible with will_paginate interface
and add two additional criterias: skip
and limit
Yes. Now you can use paginate
method like in will_paginate documentation