Extract ajax upload and destroy_upload actions from images and documents controllers and place them at new controllers to manage direct uploads

This commit is contained in:
Senén Rodero Rodríguez
2017-09-17 17:37:13 +02:00
parent c6dabedb4a
commit 826385f659
25 changed files with 369 additions and 191 deletions

View File

@@ -1,5 +1,10 @@
module DocumentsHelper
def document_note(document)
t "documents.new.#{document.documentable.class.name.parameterize.underscore}.note",
title: document.documentable.title
end
def document_attachment_file_name(document)
document.attachment_file_name
end