<%= form_for [:direct, @post], html: { id: "direct" } do |form| %>

<%= @post.errors.full_messages.to_sentence %>

<%= form.label :title %> <%= form.text_field :title %>

<%= form.label :document %> <%= form.attachment_field :document, direct: true %>

<%= form.submit "Create" %>

<% end %>