diff --git a/app/controllers/federal_tax_brackets_controller.rb b/app/controllers/federal_tax_brackets_controller.rb
index 88426d5..013b796 100644
--- a/app/controllers/federal_tax_brackets_controller.rb
+++ b/app/controllers/federal_tax_brackets_controller.rb
@@ -4,6 +4,10 @@ class FederalTaxBracketsController < ApplicationController
# GET /federal_tax_brackets or /federal_tax_brackets.json
def index
@federal_tax_brackets = FederalTaxBracket.order_by_range
+ respond_to do |format|
+ format.turbo_stream
+ format.html
+ end
end
# GET /federal_tax_brackets/1 or /federal_tax_brackets/1.json
diff --git a/app/views/components/_toolbar.html.erb b/app/views/components/_toolbar.html.erb
index c28240c..01c0b14 100644
--- a/app/views/components/_toolbar.html.erb
+++ b/app/views/components/_toolbar.html.erb
@@ -1,17 +1,17 @@
-
+
-
- Budget Calculator
+ Budget Calculator
-
- Federal Tax Brackets
+ <%= link_to "Federal Tax Brackets", federal_tax_brackets_path, data: { turbo_stream: true }, class: "inline-block p-4 rounded-t-lg hover:text-gray-600 hover:bg-gray-50" %>
-
- State Income Tax
+ State Income Tax
-
- Incomes
+ Incomes
-
- Fixed Expenses
+ Fixed Expenses
diff --git a/app/views/federal_tax_brackets/_index.html.erb b/app/views/federal_tax_brackets/_index.html.erb
index 9974136..b21ab8c 100644
--- a/app/views/federal_tax_brackets/_index.html.erb
+++ b/app/views/federal_tax_brackets/_index.html.erb
@@ -1,15 +1,17 @@
<%= turbo_frame_tag :federal_tax_brackets do %>
-
-
- <% tax_headings = ["Filing Status", "Tier", "From", "To", "Rate", "Cumulative"] %>
- <% tax_headings.each do |tax_heading| %>
-
- <%= tax_heading %>
-
- <% end %>
-
-
+
+
+
+ <% tax_headings = ["Filing Status", "Tier", "From", "To", "Rate", "Cumulative"] %>
+ <% tax_headings.each do |tax_heading| %>
+
+ <%= tax_heading %>
+
+ <% end %>
+
+
- <%= render @federal_tax_brackets %>
+ <%= render @federal_tax_brackets %>
+
<% end %>
diff --git a/app/views/federal_tax_brackets/index.html.erb b/app/views/federal_tax_brackets/index.html.erb
index c3c8c95..3b6f7f7 100644
--- a/app/views/federal_tax_brackets/index.html.erb
+++ b/app/views/federal_tax_brackets/index.html.erb
@@ -10,7 +10,5 @@
-
- <%= render partial: "federal_tax_brackets/index" %>
-
+ <%= render partial: "federal_tax_brackets/index" %>
diff --git a/app/views/federal_tax_brackets/index.turbo_stream.erb b/app/views/federal_tax_brackets/index.turbo_stream.erb
new file mode 100644
index 0000000..5eb6353
--- /dev/null
+++ b/app/views/federal_tax_brackets/index.turbo_stream.erb
@@ -0,0 +1 @@
+<%= turbo_stream.replace "primary_frame", partial: "federal_tax_brackets/index" %>
\ No newline at end of file