% if field.object_name =~ /.*\[.*\]\[(.*)\]/ %> <% assoc = true %> <% field.object.fileupload_guid = field.object.fileupload_guid + '_' + $1 %> <% else %> <% assoc = false %> <% end %> <%= content_tag(:div, :id => field.id, :class => "uploader-dnd-area") do -%> <% # if assoc || field.object.new_record? %> <%= hidden_field(field.object_name, :fileupload_guid, :object => field.object) %> <% # end %>