Remove unused add_question action from admin polls controller
Since commit adf18ee756 this action no longer makes sense.
This commit is contained in:
@@ -42,18 +42,6 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_question
|
|
||||||
question = ::Poll::Question.find(params[:question_id])
|
|
||||||
|
|
||||||
if question.present?
|
|
||||||
@poll.questions << question
|
|
||||||
notice = t("admin.polls.flash.question_added")
|
|
||||||
else
|
|
||||||
notice = t("admin.polls.flash.error_on_question_added")
|
|
||||||
end
|
|
||||||
redirect_to admin_poll_path(@poll), notice: notice
|
|
||||||
end
|
|
||||||
|
|
||||||
def booth_assignments
|
def booth_assignments
|
||||||
@polls = Poll.current.created_by_admin
|
@polls = Poll.current.created_by_admin
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ module Abilities
|
|||||||
|
|
||||||
can [:index, :create, :update, :destroy], Geozone
|
can [:index, :create, :update, :destroy], Geozone
|
||||||
|
|
||||||
can [:read, :create, :update, :destroy, :add_question, :booth_assignments], Poll
|
can [:read, :create, :update, :destroy, :booth_assignments], Poll
|
||||||
can [:read, :create, :update, :destroy, :available], Poll::Booth
|
can [:read, :create, :update, :destroy, :available], Poll::Booth
|
||||||
can [:search, :create, :index, :destroy], ::Poll::Officer
|
can [:search, :create, :index, :destroy], ::Poll::Officer
|
||||||
can [:create, :destroy, :manage], ::Poll::BoothAssignment
|
can [:create, :destroy, :manage], ::Poll::BoothAssignment
|
||||||
|
|||||||
@@ -1103,9 +1103,6 @@ en:
|
|||||||
table_title: "Title"
|
table_title: "Title"
|
||||||
edit_answers: Edit answers
|
edit_answers: Edit answers
|
||||||
see_proposal: "(See proposal)"
|
see_proposal: "(See proposal)"
|
||||||
flash:
|
|
||||||
question_added: "Question added to this poll"
|
|
||||||
error_on_question_added: "Question could not be assigned to this poll"
|
|
||||||
destroy:
|
destroy:
|
||||||
alert: "This action will remove the poll and all its associated questions."
|
alert: "This action will remove the poll and all its associated questions."
|
||||||
success_notice: "Poll deleted successfully"
|
success_notice: "Poll deleted successfully"
|
||||||
|
|||||||
@@ -1102,9 +1102,6 @@ es:
|
|||||||
table_title: "Título"
|
table_title: "Título"
|
||||||
edit_answers: Editar respuestas
|
edit_answers: Editar respuestas
|
||||||
see_proposal: "(Ver propuesta)"
|
see_proposal: "(Ver propuesta)"
|
||||||
flash:
|
|
||||||
question_added: "Pregunta añadida a esta votación"
|
|
||||||
error_on_question_added: "No se pudo asignar la pregunta"
|
|
||||||
destroy:
|
destroy:
|
||||||
alert: "Esta acción eliminará la votación y todas sus preguntas asociadas."
|
alert: "Esta acción eliminará la votación y todas sus preguntas asociadas."
|
||||||
success_notice: "Votación eliminada correctamente"
|
success_notice: "Votación eliminada correctamente"
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ namespace :admin do
|
|||||||
scope module: :poll do
|
scope module: :poll do
|
||||||
resources :polls do
|
resources :polls do
|
||||||
get :booth_assignments, on: :collection
|
get :booth_assignments, on: :collection
|
||||||
patch :add_question, on: :member
|
|
||||||
|
|
||||||
resources :booth_assignments, only: [:index, :show, :create, :destroy] do
|
resources :booth_assignments, only: [:index, :show, :create, :destroy] do
|
||||||
get :search_booths, on: :collection
|
get :search_booths, on: :collection
|
||||||
|
|||||||
Reference in New Issue
Block a user