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

@@ -59,7 +59,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
def question_params
params.require(:poll_question).permit(:poll_id, :title, :question, :description, :proposal_id, :valid_answers, :video_url,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id])
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy])
end
def search_params