Fixed answer documents form
This commit is contained in:
@@ -20,7 +20,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
|||||||
|
|
||||||
def update
|
def update
|
||||||
if @answer.update(answer_params)
|
if @answer.update(answer_params)
|
||||||
redirect_to admin_question_path(@question), notice: t("flash.actions.save_changes.notice")
|
redirect_to admin_question_path(@answer.question), notice: t("flash.actions.save_changes.notice")
|
||||||
else
|
else
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
<div class="poll-question-form">
|
<div class="poll-question-form">
|
||||||
<%= form_for(Poll::Question::Answer.new,
|
<%= form_for(Poll::Question::Answer.new,
|
||||||
url: admin_answer_documents_path(@answer),
|
url: admin_answer_path(@answer),
|
||||||
method: :post) do |f| %>
|
method: :put) do |f| %>
|
||||||
|
|
||||||
<%= render 'shared/errors', resource: @answer %>
|
<%= render 'shared/errors', resource: @answer %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user