From da055edb372e06d81adbf2f32c0e8aef0fe20c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 27 Jul 2021 02:33:44 +0200 Subject: [PATCH] Simplify rendering proposal image in dashboard So it's now similar to the way we render images in other places. --- app/views/dashboard/mailing/index.html.erb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/views/dashboard/mailing/index.html.erb b/app/views/dashboard/mailing/index.html.erb index 850fee3fa..1886d07c8 100644 --- a/app/views/dashboard/mailing/index.html.erb +++ b/app/views/dashboard/mailing/index.html.erb @@ -9,11 +9,7 @@
- <% if proposal.image.present? %> - <%= image_tag proposal.image.attachment.url(:large) %> - <% else %> - <%= image_tag "default_mailing.jpg" %> - <% end %> + <%= image_tag(proposal.image_url(:large).presence || "default_mailing.jpg") %>