Sha256: cf7e85a70a5634be04859b966f76e2575dcf93293889ef017cd36797c69ad6e1

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

<% if item.persisted? %>
  <div id="attachments">
    <% item.attachments.each do |attachment| %>
      <%= image_tag attachment.url %>
    <% end %>
  </div>

  <input id="fileupload" type="file" name="asset" data-url="<%= new_attachment_path %>" multiple>
  <%= hidden_field_tag "attachable_id", item.id %>
  <%= hidden_field_tag "attachable_type", item.class.to_s %>
  <%= hidden_field_tag "attachable_url", attachments_path(item.class.to_s, item.id) %>

<% else %>
  First save to enable uploads
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brightcontent-attachments-2.0.7 app/views/brightcontent/base/_form_field_attachments.html.erb
brightcontent-attachments-2.0.6 app/views/brightcontent/attachments/_form_field.html.erb