.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" => "form[fields][#{index}][fields]" }
    = render_fields(field_set.fields, "form[fields][#{index}][fields]")
  
  = link_to "Delete", '#', :class => 'delete'
  
.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'
  
Fix server-rendered prefixes for nested fieldsets
Fix server-rendered prefixes for nested fieldsets
