simpler_navigation 0.1.1 → 0.1.2

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: 509f0fdc64cd8638e26bcc71ab8fb8c134f03c618daf10ab0dcc02c155441092
4
- data.tar.gz: d6ec22dfb537838f47613af757b76fcd0e1a435bc2be5608b1cbb97b0d416201
3
+ metadata.gz: e6f6f19aa6714540a0ac3161f958b90d8fa963a3ec9113828be5e764b3b2d3e6
4
+ data.tar.gz: 9af30ae6fcc8dc3f5c98d31abc99b77e7cfccaf5a2b58b05d8faca641248ed39
5
5
  SHA512:
6
- metadata.gz: c3ec60011be01edfa57b1ccee86f65baa8452d324a8f1ed0246ecb64524852565aa734689d8bd4812edf285e86db223db70f202d8e68743fb8d3f8db57bf01a5
7
- data.tar.gz: 99e7ca7469f9e534a018fad100b790bd5671b957bf30d13f2c00a842367b77cf3bb7d5db300d20096015c647afb95656f4d54fd1f27afc06455a90f45e975544
6
+ metadata.gz: 073f6c31cc9cf79eead24605f666a9ef26cc8e8a843eec6c39deaa2dc88b3af66c038940cd2a6965250849a2da8697bf7fdb24560bf122afbc83b918a7d3f381
7
+ data.tar.gz: 19f11f240651c770338b8e1fde1a3ef5da11b0923256761b1512c99b3fb87dace237950679bbec056e406a9fe1223a6a618113a3dcb85475d027f5fa45847911
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simpler_navigation (0.1.1)
4
+ simpler_navigation (0.1.2)
5
5
  actionview
6
6
  railties
7
7
 
@@ -66,6 +66,9 @@ module SimplerNavigation
66
66
  classes << SimplerNavigation.config.selected_class
67
67
  end
68
68
  options[:class] = classes.compact.join(" ")
69
+ if options[:class].empty?
70
+ options.delete(:class)
71
+ end
69
72
 
70
73
  options
71
74
  end
@@ -88,6 +91,9 @@ module SimplerNavigation
88
91
  classes << SimplerNavigation.config.active_leaf_class
89
92
  end
90
93
  options[:class] = classes.compact.join(" ")
94
+ if options[:class].empty?
95
+ options.delete(:class)
96
+ end
91
97
 
92
98
  options
93
99
  end
@@ -114,10 +120,10 @@ module SimplerNavigation
114
120
  item_url_path = url_path(item.url).downcase
115
121
  selected = SimplerNavigation.request_fullpath.downcase.start_with?(item_url_path)
116
122
  end
123
+ end
117
124
 
118
- selected ||= item.children.any? do |key, value|
119
- selected?(value)
120
- end
125
+ selected ||= item.children.any? do |key, value|
126
+ selected?(value)
121
127
  end
122
128
 
123
129
  @selected[item] = selected
@@ -33,6 +33,13 @@ module SimplerNavigation
33
33
 
34
34
  tags
35
35
  end
36
+
37
+ def link_tag_options(item)
38
+ options = super
39
+ options.delete(:class)
40
+
41
+ options
42
+ end
36
43
  end
37
44
  end
38
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimplerNavigation
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpler_navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Muerdter