pagy_cursor 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa7b0eb244dfd858e6b30a19f6cc404e92a44b98979dc4d373717ee1db1581c8
4
- data.tar.gz: b57b29a7e131887d72773d58b91d7b253c67ee199b6d4cb6c259764b40c4e295
3
+ metadata.gz: ab31fcaa027ea7c3a4a39a695505a6215672457b29775bf8139e8ae69de7faff
4
+ data.tar.gz: b49aeed576699eb3e1237c25ee69e569f0ae0a55e857462dc7473d79e0755d80
5
5
  SHA512:
6
- metadata.gz: 86002b6d143da2abd8128937af5929fa8006757f90f7d9c6ec920dd464d30ebc29e1a5af0aa853747204578fcdc652af9d7f714107db82aef07ff644a959b7a9
7
- data.tar.gz: 8ae7edaf9e1c406c0ac221d5c7475d2b26cd9f9d661749fc47db2eea21eb826daecf848624a0bb7a3f76cf9c2065176d3a169bb2180d578cafe959392511721a
6
+ metadata.gz: 687d9a0b4acc0570f333f19f868ff4c19a3866c4515efdd32e0e04086e62b9c928a9be3a472efa39bbe988344deb28a0fde50c3ea85704fa3ff1575e0de34bd1
7
+ data.tar.gz: 23c476eed3f2963fa2080a1b11019a17f23ee563499441fb45eed0837d84e8e26aaeb297a3253c0bc8e3ad3006cf3f0d2c45678a5983c0ec068cb92af93a19b1
@@ -30,6 +30,8 @@ class Pagy
30
30
  end
31
31
 
32
32
  def pagy_cursor_has_more?(collection, pagy)
33
+ return false if collection.empty?
34
+
33
35
  next_position = collection.last[pagy.primary_key]
34
36
  pagy_cursor_get_items(collection, pagy, next_position).exists?
35
37
  end
@@ -33,6 +33,8 @@ class Pagy
33
33
  end
34
34
 
35
35
  def pagy_uuid_cursor_has_more?(collection, pagy)
36
+ return false if collection.empty?
37
+
36
38
  next_position = collection.last[pagy.primary_key]
37
39
  pagy_uuid_cursor_get_items(collection, pagy, next_position).exists?
38
40
  end
@@ -1,3 +1,3 @@
1
1
  module PagyCursor
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy_cursor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uysim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-09 00:00:00.000000000 Z
11
+ date: 2020-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pagy
@@ -124,7 +124,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.0.3
127
+ rubyforge_project:
128
+ rubygems_version: 2.7.6
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: cursor paginations for pagy