Accept nested attributes for documents on proposals. Adapt documentable js file to allow many input files at the same page.

This commit is contained in:
Senén Rodero Rodríguez
2017-08-12 17:28:03 +02:00
parent e327b420ff
commit e9c5f77368
10 changed files with 74 additions and 24 deletions

View File

@@ -13,6 +13,7 @@ class Proposal < ActiveRecord::Base
documentable max_documents_allowed: 3,
max_file_size: 3.megabytes,
accepted_content_types: [ "application/pdf" ]
accepts_nested_attributes_for :documents
acts_as_votable
acts_as_paranoid column: :hidden_at