rocket_navigation 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/lib/rocket_navigation/renderer/bootstrap.rb +1 -6
- data/lib/rocket_navigation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71e3fe3cb1c0ff5332fd9ada2b2b201e48291f77353c64428680f4f27a395193
|
4
|
+
data.tar.gz: 16e476346468b28eb9551acfbd6b147fc0887a04ef244d3d2480653c93d62df5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a3e21beb04a6c1137cdf94588ff078cd11c657658de359845a57981c463dfa6a2cbfe21a83cb3cf9b9b9c332ed4a8b8f783a2f70f1e1508eeb97be86f9508c
|
7
|
+
data.tar.gz: '031808d692b079278621b02747251faf7c4a1d7d8c540ab1b3ed274e22eb85d82333c6a168faff5b180d90d59a845ce8ac4c697de2da39d8870ba1c832a190d7'
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -108,6 +108,11 @@ view:
|
|
108
108
|
= render_navigation renderer: :breadcrumbs, no_default_classes: true, prefix: "You are here: ", static_leaf: true, join_with: " → ".html_safe, &extra_nav
|
109
109
|
```
|
110
110
|
|
111
|
+
bootstrap example:
|
112
|
+
```
|
113
|
+
= render_navigation container_html: {class: "nav navbar-nav"}, renderer: :bootstrap, &navigation(:main)
|
114
|
+
```
|
115
|
+
|
111
116
|
Same options could be defined on a container when defining menu:
|
112
117
|
```ruby
|
113
118
|
def navigation(kind = :main)
|
@@ -120,6 +125,7 @@ def navigation(kind = :main)
|
|
120
125
|
primary.item :two, 'Two', root_path, item_html: {class: "more two"}, link_html: {class: "two", method: :post}
|
121
126
|
end
|
122
127
|
end
|
128
|
+
helper_method :navigation
|
123
129
|
```
|
124
130
|
|
125
131
|
|
@@ -47,6 +47,7 @@ module RocketNavigation
|
|
47
47
|
def expand_all?
|
48
48
|
true
|
49
49
|
end
|
50
|
+
|
50
51
|
def consider_sub_navigation?(item)
|
51
52
|
return false unless item.sub_navigation
|
52
53
|
true
|
@@ -79,12 +80,6 @@ module RocketNavigation
|
|
79
80
|
super(item)
|
80
81
|
end
|
81
82
|
end
|
82
|
-
|
83
|
-
def render_sub_navigation_for(item)
|
84
|
-
opts = options.dup
|
85
|
-
p opts
|
86
|
-
item.sub_navigation.render(opts)
|
87
|
-
end
|
88
83
|
end
|
89
84
|
end
|
90
85
|
end
|