diff --git a/app/controllers/admin/poll/questions_controller.rb b/app/controllers/admin/poll/questions_controller.rb index 107c06740..5cf587735 100644 --- a/app/controllers/admin/poll/questions_controller.rb +++ b/app/controllers/admin/poll/questions_controller.rb @@ -56,8 +56,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController private def question_params - params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :valid_answers, :video_url, - documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]) + params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :valid_answers, :video_url) end def search_params diff --git a/spec/shared/features/nested_documentable.rb b/spec/shared/features/nested_documentable.rb index 8780936a7..255f018e5 100644 --- a/spec/shared/features/nested_documentable.rb +++ b/spec/shared/features/nested_documentable.rb @@ -263,7 +263,6 @@ shared_examples "nested documentable" do |login_as_name, documentable_factory_na end - end end @@ -275,7 +274,7 @@ rescue return end -def documentable_attach_new_file(documentable_factory_name, index, path, success = true) +def documentable_attach_new_file(_documentable_factory_name, index, path, success = true) click_link "Add new document" document = all(".document")[index] document_input = document.find("input[type=file]", visible: false) @@ -318,8 +317,3 @@ def documentable_fill_new_valid_budget_investment fill_in_ckeditor "budget_investment_description", with: "Budget investment description" check :budget_investment_terms_of_service end - -def documentable_fill_new_valid_poll_question - page.select documentable.poll.name, from: 'poll_question_poll_id' - fill_in 'poll_question_title', with: "Star Wars: Episode IV - A New Hope" -end