From bd1c03accf22de0a4b315a97f1319121b3db45ca Mon Sep 17 00:00:00 2001 From: rgarcia Date: Fri, 6 Oct 2017 12:15:45 +0200 Subject: [PATCH] fixes upload of answer's images --- .../admin/poll/questions/answers/images_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/poll/questions/answers/images_controller.rb b/app/controllers/admin/poll/questions/answers/images_controller.rb index 4074eb371..1bf30907d 100644 --- a/app/controllers/admin/poll/questions/answers/images_controller.rb +++ b/app/controllers/admin/poll/questions/answers/images_controller.rb @@ -23,7 +23,8 @@ class Admin::Poll::Questions::Answers::ImagesController < Admin::Poll::BaseContr private def images_params - params.permit(images_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]) + params.require(:poll_question_answer).permit(:answer_id, + images_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]) end def load_answer