title: accepts_nested_attributes_for rails 4 is not deleting
body: <p>I have been reading and researching for about 3 days now.
  This is my last resort.</p>
  
  <p>land.rb:</p>
  
  <pre><code>has_many :uploads , :dependent =&gt; :destroy
  accepts_nested_attributes_for :uploads, :allow_destroy =&gt; true,:reject_if =&gt; :all_blank
  </code></pre>
  
  <p>upload.rb</p>
  
  <pre><code>belongs_to :land
  </code></pre>
  
  <p>_land_form_partial.html.erb</p>
  
  <pre><code>&lt;%= form_for land , :html =&gt; {:multipart =&gt; true} do |f| %&gt;
  
      &lt;%= f.fields_for :uploads do |builder| %&gt;
          &lt;div class="land_fields"&gt;
              &lt;%= builder.label :filename, "Image" %&gt;
              &lt;%= builder.text_field :filename %&gt;   &lt;br/&gt;
              Delete: &lt;%= builder.check_box :_destroy %&gt;
          &lt;/div&gt;
      &lt;% end %&gt;
   #... buttons and other fields
  &lt;% end %&gt;
  </code></pre>
  
  <p>lands_controller.rb</p>
  
  <pre><code>def update
      if @land.update_attributes(land_params)
        flash[:success] = "Land updated"
        redirect_to lands_path
      else
        flash[:alert] = @land.errors.full_messages.first
        redirect_to edit_land_path
      end
    end
  
   def land_params  
      params.require(:land).permit( uploads_attributes: [ :id, :filename ]  )
    end
  </code></pre>
  
  <p>When I add something to the text field and update it, all updates properly. If I click on the check-box it won't remove the field. </p>
  
  <p>Can someone please shed a light on this?</p>
  
  <p>Also I tried <a href="https://github.com/lailsonbm/awesome_nested_fields" rel="noreferrer">awesome_nested_fields</a> still everything works except for removing the actual record. </p>
  
  <p>thank you in advance.</p>
  
  <p>EDIT: Solution: (I like to put the solution in the question in case someone wants to view it on mobile as I hate when I can't see the solution straight away)</p>
  
  <p>Thanks to @nTraum </p>
  
  <pre><code>def land_params  
      params.require(:land).permit( uploads_attributes: [ :id, :filename, :_destroy ]  )
  end
  </code></pre>
  
  <p>And all will be dandy :)</p>