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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -