From 52b044d6a4278c229992404ad5801769c2d13363 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sun, 24 Aug 2025 20:29:54 +0200 Subject: First commit. Vive le Castel Peter ! --- app/views/recipes/_table.html.erb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/views/recipes/_table.html.erb (limited to 'app/views/recipes/_table.html.erb') diff --git a/app/views/recipes/_table.html.erb b/app/views/recipes/_table.html.erb new file mode 100644 index 0000000..a42a0b9 --- /dev/null +++ b/app/views/recipes/_table.html.erb @@ -0,0 +1,32 @@ +
+ + + + + + + + + + + <% pcount = [[portions.to_i, 2].max, 10].min %> + <% recipe&.each do |component, kg| %> + <% prod_name = commercial_name_for(component) %> + + + + + + + <% end %> + <% if recipe.blank? %> + + <% end %> + +
Fertilizer productComponentQty (kg)Per portion (kg)
<%= prod_name %><%= component.name %><%= fmt_kg(kg) %><%= fmt_kg(kg / pcount.to_f) %>
No supplementation required.
+
+ + -- cgit v1.2.3