title: form_for does not pass the required value when user submits blank form
body: <p>I have the following form:</p>
  
  <pre><code>  # controller
    def edit
      @doc = HomeworkDocument.find(params[:id])
    end
  
    # view
    &lt;%= form_for @doc, 
        url: student_homework_document_path(student_id: @doc.submitter_id,
                                             id: @doc.id),
        html: { multipart: true } do |f| %&gt;
  
    &lt;%= f.label :file1 %&gt;
    &lt;%= f.file_field :file1 %&gt;
  
    &lt;%= f.label :file2 %&gt;
    &lt;%= f.file_field :file2 %&gt;
  
    &lt;%= f.submit "Submit" %&gt;
  </code></pre>
  
  <p>When the user submits either one or both of <code>file1</code> and <code>file2</code>, the form works fine. However, when the user clicks submit without any file, exception is raised:</p>
  
  <pre><code>param is missing or the value is empty: homework_document
  </code></pre>
  
  <p>due to my strong param specification:</p>
  
  <pre><code>def doc_grader_params
    params.require(:homework_document)
          .permit(:file1, :file2)
  end
  </code></pre>
  
  <p>The param that gets passed is (notice no <code>homework_document</code> is passed):</p>
  
  <p>Parameters:</p>
  
  <pre><code>{"utf8"=&gt;"✓",
   "_method"=&gt;"patch",
   "authenticity_token"=&gt;"QJirOW/HQ3sv8AR/yArW6cQ2bmvz0j5D8G6czu45lLA=",
   "commit"=&gt;"Submit grading",
   "student_id"=&gt;"4",
   "id"=&gt;"21"}
  </code></pre>
  
  <p>Why does this happen and how to to include an (empty) <code>homework_document</code> hash in <code>param</code> even when the user submits blank form?</p>