diff --git a/app/controllers/admin/poll/polls_controller.rb b/app/controllers/admin/poll/polls_controller.rb index c95c8ed1f..3b3c4f7bd 100644 --- a/app/controllers/admin/poll/polls_controller.rb +++ b/app/controllers/admin/poll/polls_controller.rb @@ -47,18 +47,6 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController redirect_to admin_poll_path(@poll), notice: notice end - def remove_question - question = ::Poll::Question.find(params[:question_id]) - - if @poll.questions.include? question - @poll.questions.delete(question) - notice = t("admin.polls.flash.question_removed") - else - notice = t("admin.polls.flash.error_on_question_removed") - end - redirect_to admin_poll_path(@poll), notice: notice - end - def search_questions @questions = ::Poll::Question.where("poll_id IS ? OR poll_id != ?", nil, @poll.id).search(search: @search).order(title: :asc) respond_to do |format| diff --git a/app/views/admin/poll/polls/_questions.html.erb b/app/views/admin/poll/polls/_questions.html.erb index e41d2017e..5088572e1 100644 --- a/app/views/admin/poll/polls/_questions.html.erb +++ b/app/views/admin/poll/polls/_questions.html.erb @@ -20,10 +20,6 @@ - <%= link_to t('admin.polls.show.remove_question'), - remove_question_admin_poll_path(poll_id: @poll.id, question_id: question.id), - class: "button hollow alert", - method: :patch %> <% end %> diff --git a/app/views/admin/poll/polls/show.html.erb b/app/views/admin/poll/polls/show.html.erb index 93ce52e47..be45eeb31 100644 --- a/app/views/admin/poll/polls/show.html.erb +++ b/app/views/admin/poll/polls/show.html.erb @@ -3,6 +3,5 @@
<%= render "subnav" %> - <%= render "search_questions" %> <%= render "questions" %>
diff --git a/config/routes.rb b/config/routes.rb index 410f2dced..d085acd2a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -275,7 +275,6 @@ Rails.application.routes.draw do resources :polls do get :search_questions, on: :member patch :add_question, on: :member - patch :remove_question, on: :member resources :booth_assignments, only: [:index, :show, :create, :destroy] do get :search_booths, on: :collection