Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add documentation about custom almost array-less pagination. #272

Merged
merged 1 commit into from

2 participants

@pupeno

No description provided.

@hsbt
Collaborator

Thanks your PR.

@hsbt hsbt merged commit 5ffcf45 into amatsuda:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.rdoc
View
4 README.rdoc
@@ -227,8 +227,8 @@ However, the <tt>paginate</tt> helper doesn't automatically handle your Array ob
<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)
-You can specify the `total_count` value through options Hash. This would be helpful when handling an Array-ish object that has a different `count` value from actual `count` such as RSolr search result.
-
+You can specify the `total_count` value through options Hash. This would be helpful when handling an Array-ish object that has a different `count` value from actual `count` such as RSolr search result or when you need to generate a custom pagination. For example:
+ Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
== Creating friendly URLs and caching
Something went wrong with that request. Please try again.