Files
grecia/app/components/budgets/executions/image_component.html.erb
Javi Martín 00ea1bf719 Fix customization of budget_execution_no_image
We forgot to change the line rendering the image in commits 3574bf867c
and 810bdae37a, and so the custom image was being ignored.

Note that, in the test, we're stubbing a constant instead of adding a
new image. The main reason is that, if we add a new image, forks would
have to change the image when they change the `VALID_IMAGES` constant;
otherwise the tests would fail.
2022-08-17 12:53:00 +02:00

8 lines
344 B
Plaintext

<% if milestone&.image.present? %>
<%= image_tag milestone.image.variant(:large), alt: milestone.image.title %>
<% elsif investment.image.present? %>
<%= image_tag investment.image.variant(:large), alt: investment.image.title %>
<% else %>
<%= image_tag image_path_for("budget_execution_no_image.jpg"), alt: investment.title %>
<% end %>