<%# # Image Show Partial This partial renders an image attribute, to be displayed on a resource's show page. By default, the attribute is rendered as an image tag. ## Local variables: - `field`: An instance of [Administrate::Field::Image][1]. A wrapper around the image url pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Image %> <% if field.attached? %> <% if field.many? %> <% field.attachments.each do |attachment| %> <%= render :partial => 'fields/active_storage/item', locals: { field: field, attachment: attachment } %> <% end %> <% else %> <%= render :partial => 'fields/active_storage/item', locals: { field: field, attachment: field.data } %> <% end %> <% end %>