effective_bootstrap 0.3.19 → 0.3.20

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: f826680ae14135c5d19b81f5eafcc11b1efd6f85
4
- data.tar.gz: 4b351ab97782b921c425c02d411cd465c0396e35
3
+ metadata.gz: 20f38b6e2700a68f6f1a952c61c3b8655511787d
4
+ data.tar.gz: 656ea696adc137d67d3f2205cf58116131c65e7f
5
5
  SHA512:
6
- metadata.gz: d19333494c601ceac0fd7f5bc1a5685f76188fcd9bd5c63236675cc3ee642f677d4d4464dfbab9ca2c48bced0d7256a30e4620e901b0886d357c0294590e8205
7
- data.tar.gz: c56b546efbbceed01c4833ccbd69f1facf4cacd158c2ae99b6c74c287975e676f27bfd2d8670bd19db8252d406cf6b3cc30888df08dd5a031dab56ca9ad6d4b5
6
+ metadata.gz: f3651e74fdc48ec8a71360dc5e8ee01d4c4593c89ca97ea082869054ec0540dbb02bee6eb599e47a67a58c707df61b1bb7caef84d916cd5b4ae5a0305fa1a6b0
7
+ data.tar.gz: edd4e17846bb2cd30c098f45c8d18e407c27a84bba85e1cb57ae118168c5b239fe7854be2f5ddfbfc12f0a77b526865b996d30ce2b5024b864b1069df06be1c3
@@ -123,8 +123,11 @@ module EffectiveBootstrapHelper
123
123
  return link_to(label, path, merge_class_key(opts, 'dropdown-item'))
124
124
  end
125
125
 
126
+ strict = opts.delete(:strict)
127
+ active = (strict ? (request.fullpath == path) : request.fullpath.include?(path))
128
+
126
129
  # Regular nav link item
127
- content_tag(:li, class: (request.fullpath.include?(path) ? 'nav-item active' : 'nav-item')) do
130
+ content_tag(:li, class: (active ? 'nav-item active' : 'nav-item')) do
128
131
  link_to(label, path, merge_class_key(opts, 'nav-link'))
129
132
  end
130
133
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.3.19'.freeze
2
+ VERSION = '0.3.20'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.19
4
+ version: 0.3.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2019-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails