From 8d9b281607d8093fe74892f9f44bd3a9e45f570b Mon Sep 17 00:00:00 2001 From: Benjamin Randolph <104036158+neb417@users.noreply.github.com> Date: Thu, 7 Nov 2024 06:38:53 -0700 Subject: [PATCH] Add routes to toolbar tabs. (#56) * Add routes to toolbar links. * Move toolbar to application level. * Move toolbar to application level. * Route to index pages. --- app/controllers/incomes_controller.rb | 5 ----- app/views/components/_toolbar.html.erb | 7 ++----- app/views/dashboard/index.html.erb | 1 - app/views/layouts/application.html.erb | 1 + 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/controllers/incomes_controller.rb b/app/controllers/incomes_controller.rb index b9b27f7..def3700 100644 --- a/app/controllers/incomes_controller.rb +++ b/app/controllers/incomes_controller.rb @@ -10,11 +10,6 @@ class IncomesController < ApplicationController # GET /incomes or /incomes.json def index @incomes = Income.all - - respond_to do |format| - format.html { render :index } - format.json { render json: @incomes } - end end # GET /incomes/1 or /incomes/1.json diff --git a/app/views/components/_toolbar.html.erb b/app/views/components/_toolbar.html.erb index c0d842d..0b2be74 100644 --- a/app/views/components/_toolbar.html.erb +++ b/app/views/components/_toolbar.html.erb @@ -7,13 +7,10 @@ <%= link_to "Federal Tax Brackets", federal_tax_brackets_path, data: { turbo_stream: true }, class: active_tab == :federal_tax_brackets ? "active-toolbar-tab" : "inactive-toolbar-tab" %>