Attachments

<%#= link_to fa_icon("plus-square", text: "Add Attachment", class: "fa-fw"), "javascript: $('#attachment-form').toggle();" %>
<%= simple_form_for ProjectAttachment.new(finish: finish), url: [organization, project, :attachments], multipart: true do |f| %> <%= f.hidden_field :finish_id %> <%= f.input :file, as: :file, label: "Add an attachment", required: false %> <%= f.submit "Add Attachment", class: "tiny button radius" %> <% end %>
<% if project_member_access? %> <% end %> <% attachments.each do |attachment| -%> <% if project_member_access? %> <% end %> <% end -%>
Preview File 
<%= attachment_preview attachment %> <%= link_to attachment.file.display_name, attachment.file.url %> <%= link_to "Delete", [organization, project, :attachment, id: attachment], method: :delete, data: { confirm: "Are you sure?" }, class: "tiny button radius" %>