<%= 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.label :category %> <%= f.collection_select(:category_id, Category.where(user_id: session[:user_id]).sort_by(&:get_fqcn), :id, :get_fqcn) %>
<%= f.submit %>
<% end %>