After destroy question redirect to his poll show page

After removing a question from a poll it makes more sense to redirect to
your own poll show page in order to manage their questions.

Currently it is redirecting to the questions index page where all the
questions from all the polls are displayed and takes you completely out
of the context of the poll you are in.

In the future we will remove this index question page.
This commit is contained in:
taitus
2022-09-08 16:40:08 +02:00
parent cc4b22ee37
commit ad9362399e
2 changed files with 4 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
else
notice = t("flash.actions.destroy.error")
end
redirect_to admin_questions_path, notice: notice
redirect_to admin_poll_path(@question.poll), notice: notice
end
private