voodoorai2000
19b7526421
Add document upload from admin section
2019-04-30 11:59:08 +02:00
Julian Herrero
6e88031537
Fix several rubocop warnings
...
Metrics/LineLength: Line is too long.
RSpec/InstanceVariable: Use let instead of an instance variable.
Layout/TrailingBlankLines: Final newline missing.
Style/StringLiterals: Prefer double-quoted strings.
2019-04-17 17:40:56 +02:00
Angel Perez
01c1ac2b10
Replace all occurrences of ActiveRecord::Base with ApplicationRecord
2019-04-17 17:40:56 +02:00
rgarcia
b2b418284d
Fix ActiveModel::Errors#[]= deprecation warning
...
DEPRECATION WARNING: ActiveModel::Errors#[]= is deprecated and will be
removed in Rails 5.1. Use model.errors.add(:attachment, "content type
image/png does not match any of accepted content types pdf") instead.
(called from validate_attachment_content_type at
/home/travis/build/consul/consul/app/models/document.rb:92)
2019-04-17 17:40:55 +02:00
Bertocq
b990384b0a
Fix multiple attachment upload by setting the id, style and updated at date on hash
2018-01-03 17:38:44 +01:00
Manuel Ortega
2fef9c14d0
Moving humanized_content_type from DocumentablesHelper to Document model. Removing humanized_file_size in favor of direct use of number_to_human_size form ActionViewHelper. Added additional documentens to all concerned views
2017-10-18 22:21:01 +02:00
Bertocq
ce0a7f6fad
Rubocop autocorrections
2017-10-17 22:00:00 +02:00
Senén Rodero Rodríguez
e58feb7d6d
Fix for remote filesytem paperclip configuration.
2017-09-26 13:57:14 +02:00
Senén Rodero Rodríguez
eb8ab83ac9
Remove cached files after complete uploads.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
c22637c349
Move method 'recover_documents_from_cache' from documentable controllers to document.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
fe7b0edb38
Adjust filename obfuscation to be able to remove cached uploads
2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
661bdda41f
Stronger direct upload model specs
2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
baf9ce90a9
Obfuscate documentable and imageable file names.
2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
824dd26d5a
User new direct uploads controllers action on documentable. Skipped spec.
2017-09-26 13:55:51 +02:00
Senén Rodero Rodríguez
c6dabedb4a
Add missing image model spec. Add shared specs to check image validations at any imageable model
2017-09-26 13:55:03 +02:00
Senén Rodero Rodríguez
6f71da07ee
Duplicate documentable code and rename for imageable
2017-09-26 13:55:03 +02:00
Bertocq
e4e78c8f16
Rubocop autocorrections
2017-09-14 15:08:35 +02:00
Senén Rodero Rodríguez
c3277d53c8
Change direct uploads path
2017-09-01 13:07:13 +02:00
Senén Rodero Rodríguez
5581445fff
Use different path to store ajax uploaded cached attachments
2017-08-31 12:37:41 +02:00
Senén Rodero Rodríguez
6d66077a94
Make documentable capable to work with local or remote storage system.
2017-08-30 17:07:52 +02:00
Senén Rodero Rodríguez
57930df535
Remove unused code
2017-08-25 19:14:15 +02:00
Senén Rodero Rodríguez
f4ac8b17d0
Store AJAX uploaded documents with timestamp prefix to avoid file name collision. Remove cached_attachments after document save.
2017-08-25 18:34:54 +02:00
Senén Rodero Rodríguez
8e91bbe5b5
Fix document validations specs
2017-08-25 18:34:53 +02:00
Senén Rodero Rodríguez
cc89907bff
Add nested documents to proposal form.
2017-08-25 18:34:52 +02:00
Senén Rodero Rodríguez
e9c5f77368
Accept nested attributes for documents on proposals. Adapt documentable js file to allow many input files at the same page.
2017-08-25 18:34:51 +02:00
Senén Rodero Rodríguez
e327b420ff
Ajax file upload to tmp dir. Add cached_attachment to document. Recover image from cache. Add progress bar.
2017-08-25 18:34:51 +02:00
Senén Rodero Rodríguez
92e8468e89
Use documentables helper method within specs and document model.
2017-08-25 18:34:50 +02:00
Senén Rodero Rodríguez
17ad148cd7
Fix i18n translations warnings.
2017-08-25 18:34:50 +02:00
Senén Rodero Rodríguez
3a7c9d9f83
Add documentables helper
2017-08-25 18:34:49 +02:00
Senén Rodero Rodríguez
38d4d59241
Add arguments to documentable concern to make it configurable for any recipient model.
2017-08-25 17:27:37 +02:00
Senén Rodero Rodríguez
34d06dad04
Add document model validations and model shared specs.
2017-08-25 17:27:37 +02:00
Senén Rodero Rodríguez
a141c82e33
Create new polymorphic model Document.
2017-08-25 17:27:37 +02:00