Merge pull request #947 from ab320012/patch-1

updated readme to include unscoping [ci skip]
This commit is contained in:
Yuki Nishijima 2018-04-12 17:03:11 -04:00 committed by GitHub
commit 3154ee2514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -118,6 +118,14 @@ User.page(7).per(50).padding(3)
Note that the `padding` scope also is not directly defined on the models.
### Unscoping
If for some reason you need to unscope `page` and `per` methods you can call `except(:limit, :offset)`
```ruby
users = User.page(7).per(50)
unpaged_users = users.except(:limit, :offset) # unpaged_users will not use the kaminari scopes
```
## Configuring Kaminari