Don't allow to modify answer's documents for started polls
This commit is contained in:
committed by
Javi Martín
parent
245594f32b
commit
4c8f247de7
@@ -8,6 +8,7 @@ class Admin::Poll::Questions::Answers::DocumentsController < Admin::Poll::BaseCo
|
||||
|
||||
def create
|
||||
@answer.attributes = documents_params
|
||||
authorize! :update, @answer
|
||||
|
||||
if @answer.save
|
||||
redirect_to admin_answer_documents_path(@answer),
|
||||
|
||||
Reference in New Issue
Block a user