nav 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nav/version.rb +1 -1
- data/lib/nav.rb +5 -2
- data/test/test_helper.rb +1 -1
- metadata +5 -6
- data/init.rb +0 -5
data/lib/nav/version.rb
CHANGED
data/lib/nav.rb
CHANGED
@@ -5,7 +5,8 @@ module Nav
|
|
5
5
|
def nav( options = {}, &block )
|
6
6
|
builder = Builder.new( self, options )
|
7
7
|
yield( builder )
|
8
|
-
|
8
|
+
|
9
|
+
builder.to_html if builder.actions?
|
9
10
|
end
|
10
11
|
|
11
12
|
|
@@ -36,7 +37,7 @@ module Nav
|
|
36
37
|
def actions?; @actions.any?; end
|
37
38
|
|
38
39
|
def to_html
|
39
|
-
content_tag :ul, actions.html_safe, @options
|
40
|
+
content_tag( :ul, actions.html_safe, @options ).html_safe
|
40
41
|
end
|
41
42
|
|
42
43
|
|
@@ -98,3 +99,5 @@ module Nav
|
|
98
99
|
end
|
99
100
|
|
100
101
|
end
|
102
|
+
|
103
|
+
ActionView::Base.send :include, Nav
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-08-11 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
16
|
-
requirement: &
|
16
|
+
requirement: &18194960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *18194960
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rr
|
27
|
-
requirement: &
|
27
|
+
requirement: &18194220 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *18194220
|
36
36
|
description: Simple nagivation builder
|
37
37
|
email:
|
38
38
|
executables: []
|
@@ -42,7 +42,6 @@ files:
|
|
42
42
|
- .gitignore
|
43
43
|
- Gemfile
|
44
44
|
- Rakefile
|
45
|
-
- init.rb
|
46
45
|
- lib/nav.rb
|
47
46
|
- lib/nav/version.rb
|
48
47
|
- nav.gemspec
|