% form ||= current_fields_form options ||= {} other_options ||= {} options[:multiple] ||= false if defined?(multiple) options[:multiple] = multiple ActiveSupport::Deprecation.new.warn( "The `multiple` attribute will be removed in a later version. " \ "Please pass `options: {multiple: true}` to `render` instead." ) end options[:class] = "file-upload hidden #{options[:class]}" options[:direct_upload] = true options[:data] ||= {} options[:data]['fields--file-field-target'] = "fileField" options[:data][:action] = "change->fields--file-field#handleFileSelected" persisted_files = options[:multiple] ? form.object.send(method) : [form.object.send(method)] %> <%= render 'shared/fields/field', form: form, method: method, helper: :file_field, options: options, other_options: other_options do %> <% content_for :field do %>