From 6192ea8b780e46b1e5711bb278ef20602b7c2887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Thu, 5 Oct 2017 15:19:09 +0200 Subject: [PATCH] Added documents to Poll::Question::Answer --- app/models/poll/question/answer.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/poll/question/answer.rb b/app/models/poll/question/answer.rb index 1746c480c..e1da38fe8 100644 --- a/app/models/poll/question/answer.rb +++ b/app/models/poll/question/answer.rb @@ -1,5 +1,10 @@ class Poll::Question::Answer < ActiveRecord::Base include Galleryable + include Documentable + documentable max_documents_allowed: 3, + max_file_size: 3.megabytes, + accepted_content_types: [ "application/pdf" ] + accepts_nested_attributes_for :documents, allow_destroy: true belongs_to :question, class_name: 'Poll::Question', foreign_key: 'question_id'