bootstrap_help 0.0.17 → 0.0.18

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
  SHA1:
3
- metadata.gz: 38938a1e21f978104dccaa00b18b05a0378e1bdb
4
- data.tar.gz: 8e900a0cca8da15e0679caf6a5844264b9301639
3
+ metadata.gz: e35df1897f26da48803b1a453bd3daf0bf52a843
4
+ data.tar.gz: 80a0b4ec1af1a910e8d3cac1dd08b863165b95ba
5
5
  SHA512:
6
- metadata.gz: 545bba67512960065b5dfc69f8af75e9ef010e45586fa9f42b988723c60bebd8d6e1c570cbf8460338f6c433aa02bf157e364b6e777a970a200f9162da54e9a0
7
- data.tar.gz: 551ef16523bc267200b6a5c680d553fdc2550919d3aaa1f673a7a72bc5b3a735ed7ecf8c92c40252669f65a0b39042f891b36e3c750cfb2f3edb5dee1520fc0f
6
+ metadata.gz: 56c7e77f795b45f5c67cabf76e70f4f550b33108416abe510f0f1fb690d6d37fc150b04272eeef8285406ff9e73d8ad17f463bb626a2b12d8ca20296118aa0da
7
+ data.tar.gz: 5b330c277e5e11b67a1dbfe8ea6182779fde0003e71c3ca9a2d728a786ee53a479605409ebd4f3ddf76724e9dde397431cc729fe077403d2bd25826a1aa83edb
data/README.md CHANGED
@@ -24,15 +24,15 @@ The Nav Helper helps you quickly build a fixed navigation bar in Bootstrap. For
24
24
 
25
25
  ```haml
26
26
  = main_nav(brand: "My Awesome Company") do
27
- - left do
28
- - dropdown_menu "My Menu" do
29
- - menu_link_to "Link1", "#"
30
- - menu_link_to "Link2", "#"
31
- - menu_link_to "Link3", "#"
32
- - dropdown_divider
33
- - menu_link_to "Link4", "#"
34
- - right do
35
- - menu_link_to "Sign In", "#"
27
+ = left do
28
+ = dropdown_menu "My Menu" do
29
+ = menu_link_to "Link1", "#"
30
+ = menu_link_to "Link2", "#"
31
+ = menu_link_to "Link3", "#"
32
+ = dropdown_divider
33
+ = menu_link_to "Link4", "#"
34
+ = right do
35
+ = menu_link_to "Sign In", "#"
36
36
  ```
37
37
 
38
38
  ### Table Helper
@@ -5,7 +5,7 @@ module BootstrapHelp
5
5
  include ActionView::Helpers::UrlHelper
6
6
  include ActionView::Context
7
7
 
8
- def main_nav(args)
8
+ def main_nav(args, &block)
9
9
  brand = args.fetch(:brand, '')
10
10
  brand_path = args.fetch(:brand_path, '/')
11
11
 
@@ -14,31 +14,24 @@ module BootstrapHelp
14
14
  content_tag :div, class: 'container-fluid' do
15
15
  concat(responsive_menu_variation)
16
16
  concat(link_to(brand, brand_path, class: 'brand'))
17
- if block_given?
18
- concat(yield)
19
- end
17
+ concat(capture(&block)) if block_given?
20
18
  end
21
19
  end
22
20
  end
23
21
  end
24
22
 
25
- def left
26
- if block_given?
27
- content_tag(:div, class: 'nav') { yield }
28
- end
23
+ def left(&block)
24
+ content_tag(:div, class: 'nav', &block)
29
25
  end
30
26
 
31
- def right
32
- if block_given?
33
- content_tag(:div, class: 'nav pull-right') { yield }
34
- end
27
+ def right(&block)
28
+ content_tag(:div, class: 'nav pull-right', &block)
35
29
  end
36
30
 
37
- #Dropdown Menus
38
- def dropdown_menu(menu_name)
31
+ def dropdown_menu(menu_name, &block)
39
32
  content_tag :li, :class => "dropdown" do
40
33
  dropdown_link(menu_name) +
41
- content_tag(:ul, :class => "dropdown-menu") { yield }
34
+ content_tag(:ul, :class => "dropdown-menu", &block)
42
35
  end
43
36
  end
44
37
 
@@ -1,3 +1,3 @@
1
1
  module BootstrapHelp
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_help
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Klina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-08 00:00:00.000000000 Z
11
+ date: 2013-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler