Add _destroy parameter to nested documents

This commit is contained in:
Senén Rodero Rodríguez
2017-09-23 18:11:47 +02:00
parent f8d78ec4ab
commit 77f63a4c44
10 changed files with 27 additions and 41 deletions

View File

@@ -81,7 +81,7 @@ class ProposalsController < ApplicationController
params.require(:proposal).permit(:title, :question, :summary, :description, :external_url, :video_url,
:responsible_name, :tag_list, :terms_of_service, :geozone_id,
image_attributes: [:id, :title, :attachment, :cached_attachment, :user_id],
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id] )
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy] )
end
def retired_params