|
4 | 4 | # Customize only what you really need and notice that the core Pagy works also without any of the following lines.
|
5 | 5 | # Should you just cherry pick part of this file, please maintain the require-order of the extras
|
6 | 6 |
|
7 |
| - |
8 | 7 | # Pagy DEFAULT Variables
|
9 | 8 | # See https://ddnexus.github.io/pagy/docs/api/pagy#variables
|
10 | 9 | # All the Pagy::DEFAULT are set for all the Pagy instances but can be overridden per instance by just passing them to
|
11 | 10 | # Pagy.new|Pagy::Countless.new|Pagy::Calendar::*.new or any of the #pagy* controller methods
|
12 | 11 |
|
13 |
| - |
14 | 12 | # Instance variables
|
15 | 13 | # See https://ddnexus.github.io/pagy/docs/api/pagy#instance-variables
|
16 | 14 | # Pagy::DEFAULT[:page] = 1 # default
|
17 | 15 | # Pagy::DEFAULT[:items] = 20 # default
|
18 | 16 | # Pagy::DEFAULT[:outset] = 0 # default
|
19 | 17 |
|
20 |
| - |
21 | 18 | # Other Variables
|
22 | 19 | # See https://ddnexus.github.io/pagy/docs/api/pagy#other-variables
|
23 | 20 | # Pagy::DEFAULT[:size] = [1,4,4,1] # default
|
|
30 | 27 | # Pagy::DEFAULT[:cycle] = true # example
|
31 | 28 | # Pagy::DEFAULT[:request_path] = "/foo" # example
|
32 | 29 |
|
33 |
| - |
34 | 30 | # Extras
|
35 | 31 | # See https://ddnexus.github.io/pagy/docs/extras
|
36 | 32 |
|
37 |
| - |
38 | 33 | # Backend Extras
|
39 | 34 |
|
40 | 35 | # Array extra: Paginate arrays efficiently, avoiding expensive array-wrapping and without overriding
|
|
118 | 113 | # uncomment if you are going to use Searchkick.pagy_search
|
119 | 114 | # Searchkick.extend Pagy::Searchkick
|
120 | 115 |
|
121 |
| - |
122 | 116 | # Frontend Extras
|
123 | 117 |
|
124 | 118 | # Bootstrap extra: Add nav, nav_js and combo_nav_js helpers and templates for Bootstrap pagination
|
|
155 | 149 | # See https://ddnexus.github.io/pagy/docs/extras/navs#steps
|
156 | 150 | # Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example
|
157 | 151 |
|
158 |
| - |
159 | 152 | # Feature Extras
|
160 | 153 |
|
161 | 154 | # Gearbox extra: Automatically change the number of items per page depending on the page number
|
|
232 | 225 | # filepath: 'path/to/pagy-xyz.yml',
|
233 | 226 | # pluralize: lambda{ |count| ... } )
|
234 | 227 |
|
235 |
| - |
236 | 228 | # I18n extra: uses the standard i18n gem which is ~18x slower using ~10x more memory
|
237 | 229 | # than the default pagy internal i18n (see above)
|
238 | 230 | # See https://ddnexus.github.io/pagy/docs/extras/i18n
|
|
241 | 233 | # Default i18n key
|
242 | 234 | # Pagy::DEFAULT[:i18n_key] = 'pagy.item_name' # default
|
243 | 235 |
|
244 |
| - |
245 | 236 | # When you are done setting your own default freeze it, so it will not get changed accidentally
|
246 | 237 | Pagy::DEFAULT.freeze
|
0 commit comments