actionset 0.5.1 → 0.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cc1754eed05ab67bf65fe136f44a632ba04ea39
4
- data.tar.gz: ba34642fd14eb52a4a06a878eeacc8f15f5a244e
3
+ metadata.gz: c79748b670a37bf579f059bd61991730ad800be2
4
+ data.tar.gz: 1de4a27a63de5897eb9c968bc7eedb85a2fd9153
5
5
  SHA512:
6
- metadata.gz: 9c9e268b59574dc5ea13129989a742ed921ab866f7bb679a33bc219ed8569a7d627fa4e403604a7514cb00119b1128e12b7a7f05f7185cf39a87e012430b3abc
7
- data.tar.gz: 8fae13323ed5efef44857f881cf1b65fb62293e1a7eaed4f922343741d8beb0fb1c5737acf3d0a2ef72b270e9983e1a71d82a178f18f0633da67540aa1410e16
6
+ metadata.gz: 55d7642135914064051456c03264cc6338e7e11b3a8ef6d2abbd1672f9093b8cce47515ab5af8377a1ff83955da18b5b95b4f067319a05a3198c9266dcab8923
7
+ data.tar.gz: d151f229de5caa2d5a21be13e3d4513ca3ff16afef84076998b225e5316e063e24997e1e223ad207ffd0371b13f100dc33287c99bb2e6ba27a4fb9a21d6ddd84
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.5.2
2
+ - Fix the pagination total_pages_for helper to properly handle the case when the set has no members
1
3
  v 0.5.1
2
4
  - Fix the sorting path helper to only ever allow single-vector sorting
3
5
  - Fix the pagination description helper to have proper HTML spacing
@@ -8,6 +8,7 @@ module Pagination
8
8
 
9
9
  def pagination_total_pages_for(set)
10
10
  total_set_size = set.set.count
11
+ return 1 if total_set_size == 0
11
12
 
12
13
  (total_set_size.to_f / pagination_page_size_for(set)).ceil
13
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionSet
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim