Don't allow to modify answer's documents for started polls

This commit is contained in:
Julian Herrero
2022-09-05 11:33:13 +02:00
committed by Javi Martín
parent 245594f32b
commit 4c8f247de7
13 changed files with 162 additions and 22 deletions

View File

@@ -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),