rails_bootstrap_navbar 0.1.4.beta → 0.1.5.beta

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -21,4 +21,9 @@ These allow you to add dividers and headers into your dropdowns. Surprisingly en
21
21
 
22
22
  ## v0.1.4.beta
23
23
 
24
- * Added ability to change the link for the brand text
24
+ * Added ability to change the link for the brand text
25
+
26
+ ## v0.1.5.beta
27
+
28
+ * Minor fix - make menu_item link default to "#"
29
+ * Readme updates
data/README.md CHANGED
@@ -148,6 +148,12 @@ You can group menu items in theoretical boxes which you can apply logic to - e.g
148
148
 
149
149
  The active menu item will be inferred from the link for now.
150
150
 
151
+ The important methods here are menu_group and menu_item.
152
+
153
+ menu_group only takes one argument - :pull - this moves the group left or right when passed :left or :right.
154
+
155
+ menu_item generates a link wrapped in an li tag. It takes two arguments and an options hash. The first argument is the name (the text that will appear in the menu), and the path (which defaults to "#" if left blank). The rest of the options are passed straight through to the link_to helper, so that you can add classes, ids, methods or data tags etc.
156
+
151
157
  ````
152
158
  <%= nav_bar :fixed => :top, :brand => "Ninety Ten" do %>
153
159
  <% menu_group do %>
@@ -254,7 +260,7 @@ You can shift things to the left or the right across the nav bar. It's easiest t
254
260
 
255
261
  ### Text in the navbar
256
262
 
257
- If you want to put regualr plain text in the navbar anywhere, you do it like this:
263
+ If you want to put regular plain text in the navbar anywhere, you do it like this:
258
264
 
259
265
  ````
260
266
  <%= nav_bar :brand => "Apple" do %>
@@ -263,6 +269,7 @@ If you want to put regualr plain text in the navbar anywhere, you do it like thi
263
269
  <%= menu_item "About Us", about_us_path %>
264
270
  <% end %>
265
271
  ````
272
+ It also takes the :pull option to drag it to the left or right.
266
273
 
267
274
  ## Contributing
268
275
 
@@ -1,3 +1,3 @@
1
1
  module RailsBootstrapNavbar
2
- VERSION = "0.1.4.beta"
2
+ VERSION = "0.1.5.beta"
3
3
  end
@@ -18,7 +18,7 @@ module RailsBootstrapNavbar
18
18
  content_tag(:ul, :class => "nav#{pull_class}", &block)
19
19
  end
20
20
 
21
- def menu_item(name, path, *args)
21
+ def menu_item(name, path="#", *args)
22
22
  options = args.extract_options!
23
23
  content_tag :li, :class => is_active?(path) do
24
24
  link_to name, path, options
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.beta
4
+ version: 0.1.5.beta
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70221055337840 !ruby/object:Gem::Requirement
16
+ requirement: &70328358193000 !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: *70221055337840
24
+ version_requirements: *70328358193000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70221055336680 !ruby/object:Gem::Requirement
27
+ requirement: &70328358192040 !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: *70221055336680
35
+ version_requirements: *70328358192040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rails
38
- requirement: &70221055335960 !ruby/object:Gem::Requirement
38
+ requirement: &70328358191520 !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: *70221055335960
46
+ version_requirements: *70328358191520
47
47
  description: A helper method for easy generation of Twitter Bootstrap Navigation menus
48
48
  in Rails
49
49
  email: