Method: Formation::Form::ClassMethods#fieldset
- Defined in:
- lib/formation/form.rb
#fieldset(name, options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/formation/form.rb', line 25 def fieldset(name, = {}) if name.is_a? Hash = name name = Formation::Util.underscore([:legend]) end @_current_fieldset = (fieldsets[name] ||= Formation::Fieldset.new(name, )) elements << @_current_fieldset yield @_current_fieldset = nil end |