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:
Senén Rodero Rodríguez
2018-12-27 18:13:32 +01:00
parent c73aae9663
commit 9d9ad5003b
5 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
class Dashboard::PollsController < Dashboard::BaseController
class Dashboard::PollsController < Dashboard::BaseController
helper_method :poll
def index
@@ -62,7 +62,8 @@ class Dashboard::PollsController < Dashboard::BaseController
end
def question_answers_attributes
[:id, :_destroy, :title, :description, :question_id, documents_attributes: documents_attributes]
[:id, :_destroy, :title, :description, :given_order, :question_id,
documents_attributes: documents_attributes]
end
def documents_attributes