bootstrap_toolbelt 0.0.6 → 0.0.7

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: 53449e9964a8bbb68c580d19a64064f849ebc801
4
- data.tar.gz: fc5c0444d388a53066284e93119327622bfbe148
3
+ metadata.gz: 13c1634a12491b3279f995258a312ac0259a1e94
4
+ data.tar.gz: d065d62a06a47652338ef28ae1772be4e214bc82
5
5
  SHA512:
6
- metadata.gz: 71f37b40bafd5270b4d6333863abf02b05dce6c0591e62d797751749ecf5b58805c58ea7ddace8ae4938898ec0f3a569998cb561dae68b5053a78bfdb729e851
7
- data.tar.gz: 74ea34cf0ff44d83bb84507dad5e3975f47057630678da6a84682610cc697ff02fb5a33f707d724dccba2388bbfc15ba884882940aa39ca9fc3c1aec24bf5cce
6
+ metadata.gz: a30a56a885a65b23d401114f37c765af572b5b14ef02eb7b33720c6936138e206b927b475e05f679a77c8bb60075989fbcc6883186dcd6cdcf58c00dfeca45c6
7
+ data.tar.gz: 5f3b943cbcbf65562de1654e866425aaf50a6ce1b6e56299a523edd6d47df4474e8bfd63c822b3ae2b54854a517df3b4a3d493e3b0f5d8ba517e7817f3a28c0b
@@ -1,10 +1,9 @@
1
1
  module NavigationHelper
2
- def nav_link(text, link_path, options = {})
3
- class_name = current_page?(link_path) ? options.fetch(:class_name, 'active') : ''
4
-
5
- content_tag(:li, class: class_name) do
6
- link_to text, link_path, options
7
- yield if block_given?
2
+ def nav_link(text, link_path, options = {}, &block)
3
+ active_class_name = current_page?(link_path) ? options.fetch(:active_class_name, 'active') : ''
4
+ inner = capture(&block)
5
+ content_tag(:li, class: options.fetch(:class_name, '')) do
6
+ concat(link_to(text, link_path, class: active_class_name)).concat( block_given? ? inner : "" )
8
7
  end
9
8
  end
10
9
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapToolbelt
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_toolbelt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristian Rasmussen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-05 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails