andy_rails_toolbox 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 290b2eef6daf36498d9d7bb54ec8c3667ac23454
4
- data.tar.gz: c3ead3f7c84415d4ccac7f4bcb020defeb8213f2
3
+ metadata.gz: 31b8a7518aee9bf4c54c09b73d02b3fbe89d0706
4
+ data.tar.gz: 20241958a1185c837802e22afb0cd0d345ddf5b7
5
5
  SHA512:
6
- metadata.gz: 619d0caa1528cee00e98b1fba0af73026aecb296e414145444e22ed01168b6334ebff3729bba87c31a62eac8a4eef35560d1bd1de64b413625d10f17f7d4884c
7
- data.tar.gz: 7c62f301586d085391ce8cc6e2733a437a6cc1446a0a3dc17d243d313240e756555ea71e7a4b14d8a45ff9d31494ea746281ac8b71bd2a6f463a82a3b17d55d1
6
+ metadata.gz: 41071a296569363077121accbe9b4b174e28073f91bf0be26f71cc67e77d872d0f405f8d172adf83f9494e1aebcb9cdd30f73bbed30954b95eca81323d329c3f
7
+ data.tar.gz: 13eb21c616bbd1dc29776578c41e40ca32ae5f4c3e55093436d91d656fca8a140b1fc18a36a6cbd319111067d0c642b38cc03651cd6b55e873237412a6e70f70
@@ -208,14 +208,21 @@ module BootstrapHelper
208
208
  # - OVERRIDE - #
209
209
  # ------------ #
210
210
 
211
- def content_tag(name, content = nil, options = nil, escape = true, &block)
212
- options, content = content, capture(&block) if block_given?
213
-
214
- options ||= {}
215
- options = options.symbolize_keys
216
- options = normalize_options_for_typography(options)
217
-
218
- content_tag_string(name, content, options, escape)
211
+ def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
212
+ if block_given?
213
+ if content_or_options_with_block.is_a?(Hash) || content_or_options_with_block.nil?
214
+ options = content_or_options_with_block
215
+ options ||= {}
216
+ options = options.symbolize_keys
217
+ options = normalize_options_for_typography(options)
218
+ end
219
+ content_tag_string(name, capture(&block), options, escape)
220
+ else
221
+ options ||= {}
222
+ options = options.symbolize_keys
223
+ options = normalize_options_for_typography(options)
224
+ content_tag_string(name, content_or_options_with_block, options, escape)
225
+ end
219
226
  end
220
227
 
221
228
  private
@@ -1,3 +1,3 @@
1
1
  module AndyRailsToolbox
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andy_rails_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChouAndy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-31 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails