<%= form_for document, url: documents_path, html: { multipart: true } do |f| %> <% if document.errors.any? %>

<%= pluralize(document.errors.count, "error") %> prohibited this document from being saved:

<% end %>
<%= f.label :doc %> <%= f.file_field :doc %>
<%= f.submit %>
<% end %>