ruby on rails 3 - Pagination for partial array -


my application retrieves items remote source that:

# in controller @items = remotesource(params[:page])  

the @items array part of whole collection. , i'm trying paginate it:

# in view paginate @items 

of course doesn't work.

how can paginate collection in such situation?

p.s. i'm using gem kaminari

try kaminari helper this: @books = kaminari.paginate_array(@items).page(params[:page])


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -