From 4f47f529c227c557a528fdc70cd77420d12786e2 Mon Sep 17 00:00:00 2001 From: KseniaGovorun Date: Sun, 1 Dec 2024 14:13:45 +0200 Subject: [PATCH] Added patrial in show page --- app/controllers/account/calculators_controller.rb | 2 +- app/views/account/calculators/show.html.erb | 1 + db/schema.rb | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 app/views/account/calculators/show.html.erb diff --git a/app/controllers/account/calculators_controller.rb b/app/controllers/account/calculators_controller.rb index c81e34f93..d96dda713 100644 --- a/app/controllers/account/calculators_controller.rb +++ b/app/controllers/account/calculators_controller.rb @@ -11,7 +11,7 @@ def index end def show - # TODO: fill it + @calculator = Calculator.find_by(slug: params[:slug]) end def new diff --git a/app/views/account/calculators/show.html.erb b/app/views/account/calculators/show.html.erb new file mode 100644 index 000000000..fa61078c3 --- /dev/null +++ b/app/views/account/calculators/show.html.erb @@ -0,0 +1 @@ +<%= render "calculators/partials/logo_picture", calculator: @calculator %> \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 1f3f7328b..e9e42b813 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -133,7 +133,6 @@ t.bigint "calculator_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.integer "priority", default: 0, null: false t.index ["calculator_id"], name: "index_formulas_on_calculator_id" end