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.
This commit is contained in:
Javi Martín
2022-12-19 14:38:10 +01:00
parent f4973498be
commit 5630a24d7a

View File

@@ -1,6 +1,6 @@
<% if budget.image.present? %>
<div class="budget-header with-background-image"
style="background-image: url(<%= polymorphic_path(budget.image.variant(:large)) %>);">
style="background-image: url('<%= j polymorphic_path(budget.image.variant(:large)) %>');">
<% else %>
<div class="budget-header">
<% end %>