3uqjoa
Last Updated: February 25, 2016
·
1.056K
· sapienza
1a7d3a0b9343d86b263fed05b1ae950d

Kaminari pagination with Arel

<a href="https://github.com/amatsuda/kaminari" target="blank">Kaminari</a> supports <a href="https://github.com/rails/arel" target="blank">Arel</a>, and it's really simple integrate it!
let's say that _
collection__ is a collection queried by Arel.

collection = Model.method(params)
@collection = Kaminari.paginate_array(collection_from_arel).page(params[:page]).per(20)  
Say Thanks
Respond