1
0
Fork 0
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:
jomo 2014-09-21 22:58:23 +02:00
parent d5248965b0
commit 6974780cb2

View file

@ -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 Keep in mind that +per+ utilizes internally +limit+ and so it will override any +limit+ that was set previously
User.count # => 1000 User.count # => 1000
a = User.limit(5).count # => 5 a = User.limit(5); a.count # => 5
b = a.page(1).per(20).size # => 20 b = a.page(1).per(20).size # => 20
* the +padding+ scope * the +padding+ scope