From 97b085797d5d1d866662081c13a67a18ed2f6910 Mon Sep 17 00:00:00 2001 From: "Benjamin Randolphgit config --global user.email neb417@gmail.comgit config --global init.defaultBranch maingit config --global core.editor atom" Date: Wed, 22 Nov 2023 15:58:09 -0700 Subject: [PATCH] Lint --- app/controllers/concerns/stream.rb | 51 ++++++++++++--------------- app/services/total_cost_calculator.rb | 12 +++---- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/app/controllers/concerns/stream.rb b/app/controllers/concerns/stream.rb index 0a16cef..1497ad8 100644 --- a/app/controllers/concerns/stream.rb +++ b/app/controllers/concerns/stream.rb @@ -15,47 +15,40 @@ def render_respond_to(turbo_replace) def switch_to_hourly [ turbo_stream.replace("salary_budget", - partial: "budget/hourly_budget", - locals: build_locals(tax_on_hourly) - ) + partial: "budget/hourly_budget", + locals: build_locals(tax_on_hourly)) ] end def switch_to_salary [ - turbo_stream.replace( "hourly_budget", - partial: "budget/salary_budget", - locals: build_locals(tax_on_salary) - ) + turbo_stream.replace("hourly_budget", + partial: "budget/salary_budget", + locals: build_locals(tax_on_salary)) ] end def render_dashboard [ - turbo_stream.replace( "hourly_budget", - partial: "budget/salary_budget", - locals: build_locals(tax_on_salary) - ), - turbo_stream.replace( "salary_budget", - partial: "budget/hourly_budget", - locals: build_locals(tax_on_hourly) - ), + turbo_stream.replace("hourly_budget", + partial: "budget/salary_budget", + locals: build_locals(tax_on_salary)), + turbo_stream.replace("salary_budget", + partial: "budget/hourly_budget", + locals: build_locals(tax_on_hourly)), turbo_stream.replace("total_costs", - partial: "shared/total_costs", - locals: { - total_annual_cost: @total_annual_cost, - total_monthly_cost: @total_monthly_cost, - total_bi_weekly_cost: @total_bi_weekly_cost - } - ), + partial: "shared/total_costs", + locals: { + total_annual_cost: @total_annual_cost, + total_monthly_cost: @total_monthly_cost, + total_bi_weekly_cost: @total_bi_weekly_cost + }), turbo_stream.replace("taxed_incomes", - partial: "shared/taxed_incomes", - locals: { - salary_taxed: @salary_taxed, - hourly_taxed: @hourly_taxed - } - ) + partial: "shared/taxed_incomes", + locals: { + salary_taxed: @salary_taxed, + hourly_taxed: @hourly_taxed + }) ] end - end diff --git a/app/services/total_cost_calculator.rb b/app/services/total_cost_calculator.rb index f15bdfd..c40065e 100644 --- a/app/services/total_cost_calculator.rb +++ b/app/services/total_cost_calculator.rb @@ -2,12 +2,12 @@ class TotalCostCalculator attr_reader :annual_cost, - :biannual_cost, - :quarterly_cost, - :monthly_cost, - :bi_weekly_cost, - :weekly_cost, - :daily_cost + :biannual_cost, + :quarterly_cost, + :monthly_cost, + :bi_weekly_cost, + :weekly_cost, + :daily_cost def initialize(cost:) @annual_cost = cost