.field-set{ "data-index" => index } = hidden_field_tag "#{prefix}[type]", field_set.type.demodulize, :id => nil .drag .drag-area = label_tag "fieldset_#{index}_legend", "Fieldset Legend:" = text_field_tag "#{prefix}[legend]", field_set.legend, :id => "fieldset_#{index}_legend" %span.note (leave blank for none) .fields{ "data-prefix" => "#{prefix}[fields]" } = render_fields(field_set.fields, "#{prefix}[fields]") = link_to "Delete", '#', :class => 'delete'