You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-13Lines changed: 2 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ gem 'rails-api'
16
16
gem 'grape', '>= 0.10.0'
17
17
18
18
# Then choose your preferred paginator from the following:
19
-
gem 'pagy'
19
+
gem 'pagy', '>= 43.0.0'# Due to breaking changes, newer versions of api-pagination require pagy 43.0.0 or later
20
20
gem 'kaminari'
21
21
gem 'will_paginate'
22
22
@@ -71,7 +71,7 @@ end
71
71
Pagy does not have a built-in way to specify a maximum number of items per page, but `api-pagination` will check if you've set a `:max_per_page` variable. To configure this, you can use the following code somewhere in an initializer:
72
72
73
73
```ruby
74
-
Pagy::DEFAULT[:max_per_page] =100
74
+
Pagy.options[:max_per_page] =100
75
75
```
76
76
77
77
If left unconfigured, clients can request as many items per page as they wish, so it's highly recommended that you configure this.
0 commit comments