Sha256: 2623c00cd9b6fbc8680b472064b73cfddef7a3563ec13d45ade1ba4ce90a77f0

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

<%#
# Carrierwave Index Partial

This partial renders the URL of the attachment as a link that
opens in a new window/tab, or the total number of attached files

## Local variables:

- `field`:
  An instance of Administrate::Field::Carrierwave.
  A wrapper around the attribute pulled from the database.
%>

<% if field.multiple? %>
  <%= pluralize(field.files.size, field.attribute.to_s.humanize.downcase) %>
<% else %>
  <%= link_to 'View', field.file.url, title: field.file.filename, target: '_blank' %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
administrate-field-carrierwave-0.1.1 app/views/fields/carrierwave/_index.html.erb
administrate-field-carrierwave-0.1.0 app/views/fields/carrierwave/_index.html.erb