From 9282519797fd6715f75ccc16b557cea4b5bd2825 Mon Sep 17 00:00:00 2001 From: Alex B Date: Thu, 12 Apr 2018 15:19:51 -0400 Subject: [PATCH] updated readme to include unscoping --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e3761be..209356d 100644 --- a/README.md +++ b/README.md @@ -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