fixes loading of poll question
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
||||||
before_action :load_question, except: [:show, :edit, :update]
|
|
||||||
before_action :load_answer, only: [:show, :edit, :update, :documents]
|
before_action :load_answer, only: [:show, :edit, :update, :documents]
|
||||||
|
before_action :load_question, except: [:show, :edit, :update]
|
||||||
|
|
||||||
load_and_authorize_resource :question, class: "::Poll::Question"
|
load_and_authorize_resource :question, class: "::Poll::Question"
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def load_question
|
def load_question
|
||||||
@question = ::Poll::Question.find(params[:question_id])
|
@question = @answer.question
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user