%# TODO: This is mostly just copy pasta from the field_field partial. # Should we just try to make that partial aware of images? # If not, should we make a new dedicated stimulus controler for this partial, # instead of hijacking the "fields--file-field" controller? %> <% 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 persisted_files = options[:multiple] ? form.object.send(method) : [form.object.send(method)] options[:width] ||= 100 options[:height] ||= 100 # options[:resize_to_limit] ||= [options[:width], options[:height]] %> <%= render 'shared/fields/field', form: form, method: method, helper: :file_field, options: options, other_options: other_options do %> <% content_for :field do %>