Method: JqueryUiForm::Helpers::WrapperHelper#fieldset

Defined in:
lib/jquery_ui_form/helpers/wrapper_helper.rb

#fieldset(*args, &block) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 13

def fieldset(*args, &block)
  legend = ""
  legend = args.shift unless args.first.is_a?(Hash)
  html_options = args.extract_options!
  html_options[:class] = "#{html_options[:class]} ui-fieldset"
  template.(:fieldset,html_options) do
    template.concat(template.(:legend, legend, html_options[:html_legend])) unless legend.blank?
    yield
  end
end