simple-sql 0.4.38 → 0.4.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple/sql/result.rb +7 -3
- data/lib/simple/sql/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc1ba2ac08457fcddf1455ab47b006030071b15ca4b9944bf7d4e4a49b9b0fe
|
4
|
+
data.tar.gz: b0910c6ecfb1978ecf4d1e42e3017a240e8987152b27a2934b85447f2c33dc89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dce03ed034f5625917a9cb6b10607c0422c2ada5aa47921971a800b0e3fb71688680a3d6babee7097d2bdc7556c14b1b21f7c4b3f11c9992ad0922b199401126
|
7
|
+
data.tar.gz: 8e3703eef2c956cff3a41f9e5de008b67de2343ae34901cb0f50b37c47e55f6e5a15b22952844a0c1266a1d4c033b1a0a3e728560683570114071b1bcb350857
|
data/lib/simple/sql/result.rb
CHANGED
@@ -65,12 +65,16 @@ class ::Simple::SQL::Result < Array
|
|
65
65
|
@current_page ||= pagination_scope.page
|
66
66
|
end
|
67
67
|
|
68
|
+
def paginated?
|
69
|
+
!! @pagination_scope
|
70
|
+
end
|
71
|
+
|
68
72
|
private
|
69
73
|
|
70
74
|
def pagination_scope
|
71
|
-
|
72
|
-
|
73
|
-
|
75
|
+
raise "Only available only for paginated scopes" unless paginated?
|
76
|
+
|
77
|
+
@pagination_scope
|
74
78
|
end
|
75
79
|
|
76
80
|
def set_pagination_info(scope)
|
data/lib/simple/sql/version.rb
CHANGED