Thanks to @FND (eb38f317f2 (commitcomment-432856))
This commit is contained in:
Akira Matsuda 2011-06-16 15:22:39 +09:00
parent af3e172ae1
commit e4e2ef1023
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ Kaminari includes a handy template generator.
=== Paginating a generic Array object
Kaminari provides an Array wrapper class that adapts a generic Array object to the <tt>paginate</tt> view helper.
However, the <tt>paginate</tt> helper doesn't automatically handle your Array object (this is an intensional design).
However, the <tt>paginate</tt> helper doesn't automatically handle your Array object (this is intentional and by design).
<tt>Kaminari::paginate_array</tt> method converts your Array object into a paginatable Array that accepts <tt>page</tt> method.
Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)