actionset 0.5.2 → 0.5.3

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: c79748b670a37bf579f059bd61991730ad800be2
4
- data.tar.gz: 1de4a27a63de5897eb9c968bc7eedb85a2fd9153
3
+ metadata.gz: d6e04a93e2805a074c0f5b5e5fca32e3e7280dc6
4
+ data.tar.gz: e8a0f5ad1bf00103fe183031d00549df20b5b7e3
5
5
  SHA512:
6
- metadata.gz: 55d7642135914064051456c03264cc6338e7e11b3a8ef6d2abbd1672f9093b8cce47515ab5af8377a1ff83955da18b5b95b4f067319a05a3198c9266dcab8923
7
- data.tar.gz: d151f229de5caa2d5a21be13e3d4513ca3ff16afef84076998b225e5316e063e24997e1e223ad207ffd0371b13f100dc33287c99bb2e6ba27a4fb9a21d6ddd84
6
+ metadata.gz: 158335ca4f482e0cbf00371fede04be07d502291c9293ea761a71ca16983ab13b839a840baaa50fdcb3ac3b8c243f3179f3d77e1f79a196738c681d90b672652
7
+ data.tar.gz: ce8354010e833973bf840d106cf9c880d28b2ffe8f302d058663d2d388bc30b59285bd685983436de6d183394eb622e43673f15b39013d051ad338f9fb2f53fe
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.5.3
2
+ - allow attributes to be passed to the `sort_link_for` and `pagination_links_for` helper methods
1
3
  v 0.5.2
2
4
  - Fix the pagination total_pages_for helper to properly handle the case when the set has no members
3
5
  v 0.5.1
@@ -14,8 +14,12 @@ module Pagination
14
14
  include Pagination::NextPageLinkForHelper
15
15
  include Pagination::LastPageLinkForHelper
16
16
 
17
- def pagination_links_for(set)
18
- content_tag(:nav, class: 'pagination', 'aria-label': 'Page navigation') do
17
+ def pagination_links_for(set, **attributes)
18
+ content_tag(:nav,
19
+ **attributes.merge(
20
+ class: 'pagination',
21
+ 'aria-label': 'Page navigation'
22
+ )) do
19
23
  safe_join([
20
24
  pagination_first_page_link_for(set),
21
25
  pagination_prev_page_link_for(set),
@@ -8,10 +8,12 @@ module Sort
8
8
  include Sort::PathForHelper
9
9
  include Sort::DescriptionForHelper
10
10
 
11
- def sort_link_for(attribute, name = nil)
11
+ def sort_link_for(attribute, name = nil, **attributes)
12
12
  link_to(name || attribute.to_s.titleize,
13
13
  sort_path_for(attribute),
14
- 'aria-label': sort_description_for(attribute))
14
+ **attributes.merge(
15
+ 'aria-label': sort_description_for(attribute)
16
+ ))
15
17
  end
16
18
  end
17
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionSet
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeset