From 17bbee47aafb1212eb4a89d22f795fe33c0e382c Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Aug 2020 11:54:03 -0300 Subject: [PATCH] =?UTF-8?q?tener=20en=20cuenta=20que=20los=20archivos=20pu?= =?UTF-8?q?eden=20estar=20vac=C3=ADos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/metadata_file.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/metadata_file.rb b/app/models/metadata_file.rb index f27d7a9..a4cf8d1 100644 --- a/app/models/metadata_file.rb +++ b/app/models/metadata_file.rb @@ -80,8 +80,10 @@ class MetadataFile < MetadataTemplate # Obtiene la ruta absoluta del archivo # - # @return [String] + # @return [String|Nil] def file + return unless value['path'] + if value['path'].is_a? ActionDispatch::Http::UploadedFile value['path'].tempfile.path else