golden-objects 0.3.2 → 0.3.3

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: 03a0e2d5404ea6f9b73f2a0db92ddbfe27c62ccd688a1884aeb5f941d9fc9588
4
- data.tar.gz: 4fe38f49e3602b2a5a7b02e7cea73268262ef2885c123842b58b00d877b58d00
3
+ metadata.gz: 0d4ee2db8852f5eddb965ed6707deb5c5e2379c75d31fc60ef1137164673841d
4
+ data.tar.gz: 8e1db0713227091ab46b1c6ab73795861711ba8317c2cd35b9145533bfe308f9
5
5
  SHA512:
6
- metadata.gz: 18fd434fedd9b088637bf830523d172ca17c42e65f68924e00aaec51fa233a1ade7c68c7b046f361f0ee483643e627d5be93f47936e60ec957839aecee9d5f92
7
- data.tar.gz: '049714cb2f8fbc338d468d4144dabdcbf2504a12651995f9b535d4062eafb6512c5945b0bf41b74647e4a6ce19e736f293001c849b1603bc3ea56bcc1c747e4f'
6
+ metadata.gz: f53b0282f9ec87265125ffaafb2078872d67ad90464abc24039fa345031b010fe2c6e363b8bd17b405113224d5df8001e0b19c77bce83a9d9626ad662f39b21e
7
+ data.tar.gz: 7f804752ea7aa38429115444da94cf227b2c3a273b05da8c7c70b5605084a3488cb51004e62ee6aa9d20cc2c2100f939a8a922b804b1405a11017fd682eb7714
@@ -1,5 +1,10 @@
1
1
  # Change Logs
2
2
 
3
+ # v0.3.3
4
+
5
+ * fix typo of `total_pages`.
6
+ * Add more methods for pagination.
7
+
3
8
  ## v0.3.2
4
9
 
5
10
  * Add `Golden::QueryRecordPresenter` and `Golden::QueryFormPresenter` as basic presenters.
@@ -35,8 +35,8 @@ module Golden
35
35
  records.total_count
36
36
  end
37
37
 
38
- def total_page
39
- records.total_page
38
+ def total_pages
39
+ records.total_pages
40
40
  end
41
41
 
42
42
  def current_page
@@ -46,5 +46,25 @@ module Golden
46
46
  def per_page
47
47
  records.limit_value
48
48
  end
49
+
50
+ def next_page
51
+ records.next_page
52
+ end
53
+
54
+ def prev_page
55
+ records.prev_page
56
+ end
57
+
58
+ def first_page?
59
+ records.first_page?
60
+ end
61
+
62
+ def last_page?
63
+ records.last_page?
64
+ end
65
+
66
+ def out_of_range?
67
+ records.out_of_range?
68
+ end
49
69
  end
50
70
  end
@@ -1,5 +1,5 @@
1
1
  module Golden
2
2
  module Objects
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: golden-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tse-Ching Ho
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-11 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport