Module: Bh::Form::StaticControlHelper

Includes:
BaseHelper
Included in:
Bh::FormBuilder
Defined in:
lib/bh/helpers/form/static_control_helper.rb

Instance Method Summary collapse

Methods included from GlyphiconHelper

#glyphicon

Instance Method Details

#static_control(text_or_options_with_block = nil, options = {}, &block) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/bh/helpers/form/static_control_helper.rb', line 8

def static_control(text_or_options_with_block = nil, options = {}, &block)
  text, options = if block_given?
    [@template.capture(&block), text_or_options_with_block]
  else
    [text_or_options_with_block, options]
  end
  static_control_string text, options || {}
end