% fieldname_p = fieldname.pluralize %>
<%= f.label "fieldname", t('admin.'+fieldname) %>
<% object.send(fieldname_p).each do |t| %>
- <%= t.file_filename %>
<%=fields_for "design["+(fieldname_p)+"][]",t,:index=>nil do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :to_destroy %>
<%end%>
Del
<% end %>
<%= fields_for "design["+(fieldname_p)+"][]", object, :index => nil do |f| %>
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>rtype}%>
<% end %>