Add given_order to related poll question answers forms
Since given order is no longer being generated automatically we need to add it to related forms and to strong parameters methods
This commit is contained in:
@@ -50,7 +50,8 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
||||
|
||||
def answer_params
|
||||
documents_attributes = [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||
attributes = [:title, :description, :question_id, documents_attributes: documents_attributes]
|
||||
attributes = [:title, :description, :given_order, :question_id,
|
||||
documents_attributes: documents_attributes]
|
||||
params.require(:poll_question_answer).permit(*attributes, *translation_params(Poll::Question::Answer))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user