def checkbox_form_group(f, method, options = {})
      gopt, lopt, fopt = split_form_group_options({ class: 'checkbox', field_class: ''}.merge(options))

      if gopt[:h_align]
        gopt[:class] = gopt[:class].blank? ?
            "col-sm-#{12-gopt[:h_align]} col-sm-offset-#{gopt[:h_align]}" :
            "#{gopt[:class]} col-sm-#{12-gopt[:h_align]} col-sm-offset-#{gopt[:h_align]}"
      end

      lbl = f.label method do
        f.check_box(method, fopt) +
            h(lopt[:text] || method.to_s.humanize) +
            if lopt[:small_text]
              "<small>#{h lopt[:small_text]}</small>"
            else
              ''
            end.html_safe
      end

      "<div class=\"#{gopt[:h_align] ? 'row' : 'form-group'}\"><div class=\"#{gopt[:class]}\">#{lbl}</div></div>".html_safe
    end
def checkbox_form_group(f, method, options = {})
      gopt, lopt, fopt = split_form_group_options({ class: 'checkbox', field_class: ''}.merge(options))

      if gopt[:h_align]
        gopt[:class] = gopt[:class].blank? ?
            "col-sm-#{12-gopt[:h_align]} col-sm-offset-#{gopt[:h_align]}" :
            "#{gopt[:class]} col-sm-#{12-gopt[:h_align]} col-sm-offset-#{gopt[:h_align]}"
      end

      lbl = f.label method do
        f.check_box(method, fopt) +
            h(lopt[:text] || method.to_s.humanize) +
            if lopt[:small_text]
              "<small>#{h lopt[:small_text]}</small>"
            else
              ''
            end.html_safe
      end

      "<div class=\"#{gopt[:h_align] ? 'row' : 'form-group'}\"><div class=\"#{gopt[:class]}\">#{lbl}</div></div>".html_safe
    end
Creates a form group including a label and a checkbox.

 To specify a label, set the +label_text+ option, otherwise the method name will be used.
 Prefix field options with +field_+ and label options with +label_+.
 Any additional options are passed to the form group.