mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Fix wrong code in README
You were setting `a` to a `Fixnum` instead of an ActiveRecord Relation: ```ruby b = a.page(1).per(20).size NoMethodError: undefined method `page' for 5:Fixnum ```
This commit is contained in:
parent
d5248965b0
commit
6974780cb2
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ Then bundle:
|
|||
|
||||
Keep in mind that +per+ utilizes internally +limit+ and so it will override any +limit+ that was set previously
|
||||
User.count # => 1000
|
||||
a = User.limit(5).count # => 5
|
||||
a = User.limit(5); a.count # => 5
|
||||
b = a.page(1).per(20).size # => 20
|
||||
|
||||
* the +padding+ scope
|
||||
|
|
Loading…
Reference in a new issue