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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -