From ae61e8bda7b089d413ebd1f7cad36b47a6b636e6 Mon Sep 17 00:00:00 2001 From: ItsVipra Date: Sat, 27 May 2023 17:12:07 +0200 Subject: [PATCH] fix stuff --- app/views/drinks/_drink.html.haml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/drinks/_drink.html.haml b/app/views/drinks/_drink.html.haml index 45f08c3c..00fd5a70 100644 --- a/app/views/drinks/_drink.html.haml +++ b/app/views/drinks/_drink.html.haml @@ -10,5 +10,12 @@ = image_tag drink.logo(:thumb), alt: drink.name, class: drink.active? ? "" : "disabled" .card-footer = show_amount drink.price - = show_amount (drink.price / drink.bottle_size)*100 - = show_amount (drink.caffeine / drink.price) if drink.caffeine + %br + = drink.price / drink.bottle_size + €/L + %br + - if drink.caffeine && !drink.caffeine.zero? + = sprintf('%.2f', (drink.caffeine / drink.price)) + mg caffeine/€ + - else + ??? mg caffeine/€