rails_bootstrap_navbar 0.1.1.beta → 0.1.2.beta
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -9,4 +9,8 @@ Added 2 new methods:
|
|
9
9
|
* drop_down_divider
|
10
10
|
* drop_down_header
|
11
11
|
|
12
|
-
These allow you to add dividers and headers into your dropdowns. Surprisingly enough...
|
12
|
+
These allow you to add dividers and headers into your dropdowns. Surprisingly enough...
|
13
|
+
|
14
|
+
## v0.1.2.beta
|
15
|
+
|
16
|
+
* Allow options for menu_items to pass through to link_to, so that you can set IDs, classes, method, data-tags etc.
|
@@ -18,9 +18,10 @@ module RailsBootstrapNavbar
|
|
18
18
|
content_tag(:ul, :class => "nav#{pull_class}", &block)
|
19
19
|
end
|
20
20
|
|
21
|
-
def menu_item(name, path)
|
21
|
+
def menu_item(name, path, *args)
|
22
|
+
options = args.extract_options!
|
22
23
|
content_tag :li, :class => is_active?(path) do
|
23
|
-
link_to name, path
|
24
|
+
link_to name, path, options
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
@@ -80,6 +80,11 @@ describe RailsBootstrapNavbar::ViewHelpers, :type => :helper do
|
|
80
80
|
self.stub!("current_page?").and_return(true)
|
81
81
|
menu_item("Home", "/").should eql('<li class="active"><a href="/">Home</a></li>')
|
82
82
|
end
|
83
|
+
it "should pass any other options through to the link_to method" do
|
84
|
+
self.stub!("current_page?").and_return(true)
|
85
|
+
menu_item("Log out", "/users/sign_out", :class => "home_link", :method => :delete).should eql(
|
86
|
+
'<li class="active"><a href="/users/sign_out" class="home_link" data-method="delete" rel="nofollow">Log out</a></li>')
|
87
|
+
end
|
83
88
|
end
|
84
89
|
|
85
90
|
describe "drop_down" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_bootstrap_navbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2.beta
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-23 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70172493208940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70172493208940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70172493208340 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70172493208340
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70172493181760 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 3.0.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70172493181760
|
47
47
|
description: A helper method for easy generation of Twitter Bootstrap Navigation menus
|
48
48
|
in Rails
|
49
49
|
email:
|