Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 committed Nov 22, 2023
1 parent ca8eb98 commit 97b0857
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 35 deletions.
51 changes: 22 additions & 29 deletions app/controllers/concerns/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions app/services/total_cost_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97b0857

Please sign in to comment.