lib/formtastic.rb
def field_set_and_list_wrapping(html_options, contents='', &block) #:nodoc:
      html_options[:name] ||= html_options.delete(:title)
      html_options[:name] = localized_attribute_string(html_options[:name], html_options[:name], :title) if html_options[:name].is_a?(Symbol)

      legend  = html_options.delete(:name).to_s
      legend %= parent_child_index(html_options[:parent]) if html_options[:parent]
      legend  = template.content_tag(:legend, template.content_tag(:span, legend)) unless legend.blank?

      contents = template.capture(&block) if block_given?

      # Ruby 1.9: String#to_s behavior changed, need to make an explicit join.
      contents = contents.join if contents.respond_to?(:join)
      fieldset = template.content_tag(:fieldset,
        legend + template.content_tag(:ol, contents),
        html_options.except(:builder, :parent)
      )
      
      template.concat(fieldset) if block_given?
      fieldset
    end
# Generates a fieldset and wraps the content in an ordered list. When working
# with nested attributes (in Rails 2.3), it allows %i as interpolation option
# in :name. So you can do:
#
#   f.inputs :name => 'Task #%i', :for => :tasks
#
# And it will generate a fieldset for each task with legend 'Task #1', 'Task #2',
# 'Task #3' and so on.
#
#
# When using semantic_fields_for, you may want to nest the fieldset inside of an 
# existing fieldset. To do so, use:
#
#   f.inputs :nested => true
#
# And it will place the fieldset inside of an <li> tag, thus nesting it inside of an existing fieldset
#
Generates a fieldset and wraps the content in an ordered list. When working
with nested attributes (in Rails 2.3), it allows %i as interpolation option
in :name. So you can do.





When using semantic_fields_for, you may want to nest the fieldset inside of an
existing fieldset. To do so, use.



And it will place the fieldset inside of an  tag, thus nesting it inside of an existing fieldset
Generates a fieldset and wraps the content in an ordered list . When working with nested attributes ( in Rails 2 . 3 ) it allows %i as interpolation option in : name . So you can do . When using semantic_fields_for you may want to nest the fieldset inside of an existing fieldset . To do so use . And it will place the fieldset inside of an tag thus nesting it inside of an existing fieldset
def field_set_and_list_wrapping(html_options, contents='', &block) 
      html_options[:name] ||= html_options.delete(:title)
      html_options[:name] = localized_attribute_string(html_options[:name], html_options[:name], :title) if html_options[:name].is_a?(Symbol)
      legend  = html_options.delete(:name).to_s
      legend %= parent_child_index(html_options[:parent]) if html_options[:parent]
      legend  = template.content_tag(:legend, template.content_tag(:span, legend)) unless legend.blank?
      contents = template.capture(&block) if block_given?
      contents = contents.join if contents.respond_to?(:join)
      fieldset = template.content_tag(:fieldset,
        legend + template.content_tag(:ol, contents),
        html_options.except(:builder, :parent)
      )
      template.concat(fieldset) if block_given?
      fieldset
    end
def field_set_and_list_wrapping ( html_options , contents = '' , & block ) html_options [ :name ] ||= html_options . delete ( :title ) html_options [ :name ] = localized_attribute_string ( html_options [ :name ] , html_options [ :name ] , :title ) if html_options [ :name ] . is_a? ( Symbol ) legend = html_options . delete ( :name ) . to_s legend %= parent_child_index ( html_options [ :parent ] ) if html_options [ :parent ] legend = template . content_tag ( :legend , template . content_tag ( :span , legend ) ) unless legend . blank? contents = template . capture ( & block ) if block_given? contents = contents . join if contents . respond_to? ( :join ) fieldset = template . content_tag ( :fieldset , legend + template . content_tag ( :ol , contents ) , html_options . except ( :builder , :parent ) ) template . concat ( fieldset ) if block_given? fieldset end
Generates a fieldset and wraps the content in an ordered list.
Generates a fieldset and wraps the content in an ordered list .
#:nodoc: # Ruby 1.9: String#to_s behavior changed, need to make an explicit join.
html_options
contents
block