pagy 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +2 -2
- data/lib/pagy.rb +1 -1
- data/lib/pagy/frontend.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2226375f9b2e7c4789d60aa45d08ba7f5842fc00caa3980586e0f1cf51a611ee
|
4
|
+
data.tar.gz: 76aedcccf63588b2dd27e83e5b616485b36a768383e424df7048c863433e9f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4992b2396dc45b7226ae0de2d6cde8bacd93716152ef8a0f6b5fb643387451527db0d3f2bc5f830e361ea0e3fb789e4a3d343b4f16a828f9764912ad2531213e
|
7
|
+
data.tar.gz: 459cb889d1c9ee9b653a0db42cb54923fa3755d42260482c66aa077244d1cd54a15323e769b8683a371dab6186c93eaf20c74214c15660de37d3139a9e31be98
|
data/lib/config/pagy.rb
CHANGED
@@ -60,8 +60,8 @@
|
|
60
60
|
|
61
61
|
# Breakpoints var used by the responsive nav helpers
|
62
62
|
# See https://ddnexus.github.io/pagy/extras/plain#breakpoints
|
63
|
-
#
|
64
|
-
|
63
|
+
# width/size pairs: example for bootstrap4 sm-md-lg internal container widths
|
64
|
+
# Pagy::VARS[:breakpoints] = { 0 => [1,0,0,1], 540 => [2,3,3,2], 720 => [3,4,4,3] }
|
65
65
|
|
66
66
|
# Feature Extras
|
67
67
|
|
data/lib/pagy.rb
CHANGED
data/lib/pagy/frontend.rb
CHANGED
@@ -13,10 +13,12 @@ class Pagy
|
|
13
13
|
module Helpers
|
14
14
|
# This works with all Rack-based frameworks (Sinatra, Padrino, Rails, ...)
|
15
15
|
def pagy_url_for(page, pagy, path_or_url=:path)
|
16
|
-
p_vars = pagy.vars; params = request.GET; params[p_vars[:page_param].to_s] = page
|
16
|
+
p_vars = pagy.vars; params = request.GET.merge(p_vars[:params]); params[p_vars[:page_param].to_s] = page
|
17
17
|
"#{request.send(path_or_url)}?#{Rack::Utils.build_nested_query(pagy_get_params(params))}#{p_vars[:anchor]}"
|
18
18
|
end
|
19
19
|
|
20
|
+
|
21
|
+
|
20
22
|
# Sub-method called only by #pagy_url_for: here for easy customization of params by overriding
|
21
23
|
def pagy_get_params(params) params end
|
22
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domizio Demichelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
|
14
14
|
and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
|