Because will_paginate does not support the mongoid
They just support the
paginate method in the
Array class. What does this mean?
Will_Paginate will find all the objects and then cut out the unneeded ones.
This can cause performance problems when you have a lot of objects.
gem "will_paginate_mongoid" to your
Gemfile and run
gem install will_paginate_mongoid
It just creates a
paginate method compatible with will_paginate interface
and adds two additional criteria:
Yes. Now you can use the
paginate method just like in the will_paginate documentation