def select_form_group(f, method, collection, value_method = nil, text_method = nil, options = {})
      gopt, lopt, fopt = split_form_group_options({ field_include_blank: true }.merge(options))
      lbl = f.label_with_small method, lopt.delete(:text), lopt
      value_method ||= :to_s
      text_method ||= :to_s
      opt = {}
      [:include_blank, :prompt, :include_hidden].each do |attr|
        if fopt[attr] != nil
          opt[attr] = fopt[attr]
          fopt.except! attr
        end
      end
      fld = gopt[:wrap].call(f.collection_select(method, collection, value_method, text_method, opt, fopt))
      form_group lbl, fld, gopt
    end
def select_form_group(f, method, collection, value_method = nil, text_method = nil, options = {})
      gopt, lopt, fopt = split_form_group_options({ field_include_blank: true }.merge(options))
      lbl = f.label_with_small method, lopt.delete(:text), lopt
      value_method ||= :to_s
      text_method ||= :to_s
      opt = {}
      [:include_blank, :prompt, :include_hidden].each do |attr|
        if fopt[attr] != nil
          opt[attr] = fopt[attr]
          fopt.except! attr
        end
      end
      fld = gopt[:wrap].call(f.collection_select(method, collection, value_method, text_method, opt, fopt))
      form_group lbl, fld, gopt
    end
Creates a form group including a label and a collection select field.

 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.