1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

update readme

This commit is contained in:
krzysztofbialek 2013-04-25 14:55:14 +02:00
parent d23564457c
commit b7b0f8fd1d

View file

@ -67,6 +67,11 @@ Then bundle:
User.count # => 1000
User.page(1).per(nil).size # => 1000
Remember that +per+ utilizes +limit+ and so it will override any +limit+ that was set previously
User.count # => 1000
a = User.limit(5).count # => 5
b = a.page(1).per(20).count # => 20 not 5
* the +padding+ scope
Occasionally you need to pad a number of records that is not a multiple of the page size.