def bootstrap_horizontal_form_group(label = nil, ratio = [2, 10], &block)
      label, ratio = nil, label if label.is_a?(Array)

      l, r   = ratio[0..1].map(&:to_i)
      offset = label.nil? ? " col-sm-offset-#{l}" : ''

      # Main content:
      content = content_tag(:div, class: "col-sm-#{r}" + offset, &block)
      # Prepend optional label:
      unless label.nil?
        content = content_tag(:label, label, class: "col-sm-#{l} control-label") + content
      end

      content_tag(:div, content, class: 'form-group')
    end
def bootstrap_horizontal_form_group(label = nil, ratio = [2, 10], &block)
      label, ratio = nil, label if label.is_a?(Array)

      l, r   = ratio[0..1].map(&:to_i)
      offset = label.nil? ? " col-sm-offset-#{l}" : ''

      # Main content:
      content = content_tag(:div, class: "col-sm-#{r}" + offset, &block)
      # Prepend optional label:
      unless label.nil?
        content = content_tag(:label, label, class: "col-sm-#{l} control-label") + content
      end

      content_tag(:div, content, class: 'form-group')
    end
TODO: bootstrap_form_div_start_tag
 TODO: bootstrap_form_div_end_tag
 Supply optional label. Use options[:ratio] for grid split/offset.
 The default is [2, 10], where 2 is label columns / offset, and
 10 is content width. If the label is omitted, the content is
 offset by the same number of columns instead.

 ==== Examples
   bootstrap_horizontal_form_group("The Label", [3, 9]) { 'This is the content' }
   # =>
     <div class="form-group">
       <label class="col-sm-3 control-label">The Label</label>
       <div class="col-sm-9">This is the content</div>
     </div>