<%= @calculator.name %>
+<%= @calculator.slug %>
+<%= t('.fields') %>:
+ <% @calculator.fields.each do |field| %> ++
<%= t('.formulas') %>:
+ <% @calculator.formulas.each do |formula| %> ++ <%= t('.unit') %>: + <%= formula.unit %> +
From 468f54360df9eda5a1c74f118551bf16c2be1db4 Mon Sep 17 00:00:00 2001 From: DanielVajnagi <82052651+DanielVajnagi@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:28:53 +0200 Subject: [PATCH] Show page (#1001) * Show page * spec --- .../account/calculators_controller.rb | 2 +- app/views/account/calculators/show.html.erb | 58 ++++++++++++++++++- spec/requests/account/calculators_spec.rb | 11 ++++ 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/app/controllers/account/calculators_controller.rb b/app/controllers/account/calculators_controller.rb index 9a14436cf..beb21c3f4 100644 --- a/app/controllers/account/calculators_controller.rb +++ b/app/controllers/account/calculators_controller.rb @@ -10,7 +10,7 @@ def index end def show - # TODO: fill it + @calculator = resource end def new diff --git a/app/views/account/calculators/show.html.erb b/app/views/account/calculators/show.html.erb index 553e9b798..4ba438cfc 100644 --- a/app/views/account/calculators/show.html.erb +++ b/app/views/account/calculators/show.html.erb @@ -1 +1,57 @@ -<%= render "shared/under_construction" %> +
<%= @calculator.name %>
+<%= @calculator.slug %>
+