From 6d3e73fdfebda196838c98027a481da5941a6f2a Mon Sep 17 00:00:00 2001 From: f Date: Tue, 20 Aug 2019 18:59:54 -0300 Subject: [PATCH] no fallar si la imagen no existe --- app/views/posts/attribute_ro/_image.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/posts/attribute_ro/_image.haml b/app/views/posts/attribute_ro/_image.haml index a50d441..c400985 100644 --- a/app/views/posts/attribute_ro/_image.haml +++ b/app/views/posts/attribute_ro/_image.haml @@ -1,6 +1,7 @@ %tr{ id: attribute } %th= post_label_t(attribute, :path, post: post) %td - %figure - = image_tag metadata.value['path'], alt: metadata.value['description'] - %figcaption= metadata.value['description'] + - if metadata.value['path'].present? + %figure + = image_tag metadata.value['path'], alt: metadata.value['description'] + %figcaption= metadata.value['description']