Add arguments to documentable concern to make it configurable for any recipient model.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-21 19:48:57 +02:00
parent 62372aaee3
commit 38d4d59241
11 changed files with 78 additions and 22 deletions

View File

@@ -7,13 +7,14 @@ class Budget
include Reclassification
include Followable
include Documentable
documentable max_documents_allowed: 3,
max_file_size: 3.megabytes,
accepted_content_types: [ "application/pdf" ]
acts_as_votable
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases
MAX_DOCUMENTS_SIZE = 3
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :heading
belongs_to :group