effective_form_inputs 1.2.1 → 1.2.2

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: ffbdd3570fbbbbb3a1ae2cd03a802a618455bf8e
4
- data.tar.gz: 66f8beb3ace03bfdb9aaba691668ba290a5b34c6
3
+ metadata.gz: b795af9a9786ae9ee1efdf00a31b12d3a1e3b446
4
+ data.tar.gz: 87ea3406808b96fd668d717c8080d85d5f997ec3
5
5
  SHA512:
6
- metadata.gz: e718191a5e9ad5fd59bd041e8cab6ad338a5f43961161d7ef8c4903a991d7b960a51f000abb62f681522a88442ec58666a6757602e3c8d58fce4f47232f98d1d
7
- data.tar.gz: 6bb1dc6fa254a451578f9d2cdb1e09710947780c6515cd7b0ba928a06c98cdf6bd4e3669e38a349c7f27c315916df3e6e45216869f03a9787ae1edb1456cd2a6
6
+ metadata.gz: 5856c9df7f3c13e18d602f55d16e1e0ee2e25c3e69a117ed6c1fef89ac26813ad6ceb1000b03105b2e29689b15c09e913fbfb16ac06bc7506fb5354aa3fe4cfc
7
+ data.tar.gz: 6e2b93e14072ebbbf8564bc8c20fcce731bd830fc687e980e8351968ad109e2213a4235508bad34b3ca2e669d48b950b25c8377560aff5f9ead404d374138825
@@ -51,8 +51,8 @@ module EffectiveBootstrap3Helper
51
51
  end
52
52
  end
53
53
 
54
- def tab(label, controls = nil, &block)
55
- controls ||= label.to_s.parameterize.gsub('_', '-')
54
+ def tab(label, options = {}, &block)
55
+ controls = options.delete(:controls) || label.to_s.parameterize.gsub('_', '-')
56
56
  controls = controls[1..-1] if controls[0] == '#'
57
57
 
58
58
  active = (@_tab_active == :first || @_tab_active == label)
@@ -66,7 +66,8 @@ module EffectiveBootstrap3Helper
66
66
  end
67
67
  end
68
68
  else # Inserting the content into the tab itself
69
- content_tag(:div, id: controls, class: "tab-pane#{' active' if active}", role: 'tabpanel') do
69
+ classes = ['tab-pane', ('active' if active), options[:class].presence].compact.join(' ')
70
+ content_tag(:div, id: controls, class: classes, role: 'tabpanel') do
70
71
  yield
71
72
  end
72
73
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_form_inputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
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: 2018-03-06 00:00:00.000000000 Z
11
+ date: 2018-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails