From 5630a24d7aebf33c79bd8bdf4fc60a6afce531bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 19 Dec 2022 14:38:10 +0100 Subject: [PATCH] Render budget images with special chars their names Images with brackets weren't being rendered properly, so we're now enclosing the URL in single quotes. In order to render images with single quotes, we're also using the `j` method. Since the tests were written by a different developer, we're adding them in the next commit. --- app/components/budgets/budget_component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/budgets/budget_component.html.erb b/app/components/budgets/budget_component.html.erb index d0855c9db..2563ee70d 100644 --- a/app/components/budgets/budget_component.html.erb +++ b/app/components/budgets/budget_component.html.erb @@ -1,6 +1,6 @@ <% if budget.image.present? %>
+ style="background-image: url('<%= j polymorphic_path(budget.image.variant(:large)) %>');"> <% else %>
<% end %>