simpler_navigation 0.1.1 → 0.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f6f19aa6714540a0ac3161f958b90d8fa963a3ec9113828be5e764b3b2d3e6
|
4
|
+
data.tar.gz: 9af30ae6fcc8dc3f5c98d31abc99b77e7cfccaf5a2b58b05d8faca641248ed39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073f6c31cc9cf79eead24605f666a9ef26cc8e8a843eec6c39deaa2dc88b3af66c038940cd2a6965250849a2da8697bf7fdb24560bf122afbc83b918a7d3f381
|
7
|
+
data.tar.gz: 19f11f240651c770338b8e1fde1a3ef5da11b0923256761b1512c99b3fb87dace237950679bbec056e406a9fe1223a6a618113a3dcb85475d027f5fa45847911
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
|
119
|
-
|
120
|
-
end
|
125
|
+
selected ||= item.children.any? do |key, value|
|
126
|
+
selected?(value)
|
121
127
|
end
|
122
128
|
|
123
129
|
@selected[item] = selected
|