Module: Bh::Form::CheckBoxHelper

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

Instance Method Summary collapse

Methods included from GlyphiconHelper

#glyphicon

Instance Method Details

#check_box(method, options = {}, checked_value = '1', unchecked_value = '0') ⇒ Object



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

def check_box(method, options = {}, checked_value = '1', unchecked_value = '0')
  block = -> { super method, options, checked_value, unchecked_value }
  if options.delete(:inline_label) { true }
    check_box_with_inline_label method, options, &block
  else
    check_box_with_block_label method, options, &block
  end
end