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
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,11 @@ ApiPagination.configure do |config|
58
58
config.per_page_param do |params|
59
59
params[:page][:size] if params[:page].is_a?(ActionController::Parameters)
60
60
end
61
-
61
+
62
62
# Optional: Include the total and last_page link header
63
63
# By default, this is set to true
64
64
# Note: When using kaminari, this prevents the count call to the database
65
-
config.include_total =false
65
+
config.include_total =false
66
66
end
67
67
```
68
68
@@ -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::VARS[:max_per_page] =100
74
+
Pagy::DEFAULT[: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