diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index b4ea0cca3..30aaf1bfd 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -226,6 +226,11 @@ a { a { color: $text-medium; padding: 0; + + &.active { + font-weight: bold; + color: $brand; + } } h2 { @@ -236,11 +241,6 @@ a { border-bottom: 2px solid $brand; color: $brand; } - - &.bold { - font-weight: bold; - color: $brand; - } } &.no-margin-top { diff --git a/app/controllers/budgets/results_controller.rb b/app/controllers/budgets/results_controller.rb index 96f52b8ca..40586ed96 100644 --- a/app/controllers/budgets/results_controller.rb +++ b/app/controllers/budgets/results_controller.rb @@ -7,25 +7,21 @@ module Budgets def show authorize! :read_results, @budget - @investments = load_result.investments + @investments = Budget::Result.new(@budget, @heading).investments end private - def load_result - Budget::Result.new(@budget, @heading) - end - def load_budget @budget = Budget.find_by(id: params[:budget_id]) end def load_heading - if params[:heading_id].present? - @heading = @budget.headings.find(params[:heading_id]) - else - @heading = @budget.headings.first - end + @heading = if params[:heading_id].present? + @budget.headings.find(params[:heading_id]) + else + @budget.headings.first + end end end diff --git a/app/views/budgets/results/_results_table.html.erb b/app/views/budgets/results/_results_table.html.erb index f391e8d50..e7cfadaff 100644 --- a/app/views/budgets/results/_results_table.html.erb +++ b/app/views/budgets/results/_results_table.html.erb @@ -1,4 +1,4 @@ -