def unpersisted_attachment_fields(method, multiple)
      unpersisted_attachments(method).map.with_index do |attachment, idx|
        hidden_field method,
                     mutiple: multiple ? :multiple : false, value: attachment.signed_id,
                     name: "#{object_name}[#{method}]#{'[]' if multiple}",
                     data: {
                       direct_upload_id: idx,
                       uploaded_file: { name: attachment.filename, size: attachment.byte_size },
                       icon_container_id: "asdndz-#{object_name}_#{method}__icon-container"
                     }
      end
    end
def unpersisted_attachment_fields(method, multiple)
      unpersisted_attachments(method).map.with_index do |attachment, idx|
        hidden_field method,
                     mutiple: multiple ? :multiple : false, value: attachment.signed_id,
                     name: "#{object_name}[#{method}]#{'[]' if multiple}",
                     data: {
                       direct_upload_id: idx,
                       uploaded_file: { name: attachment.filename, size: attachment.byte_size },
                       icon_container_id: "asdndz-#{object_name}_#{method}__icon-container"
                     }
      end
    end
returns an array of tags used to pre-populate the the dropzone with tags queueing unpersisted
 file attachments for attachment at the next form submission.

 @author Ian Grant
 @param [Symbol] method The attribute on the target model to attach the files to.
 @param [Boolean] multiple Whether the dropzone should accept multiple attachments or not.
 @return [Array] An array of hidden field tags for each unpersisted file attachment.