diff --git a/app/controllers/valuation/budgets_controller.rb b/app/controllers/valuation/budgets_controller.rb index 990fffdda..338cccec4 100644 --- a/app/controllers/valuation/budgets_controller.rb +++ b/app/controllers/valuation/budgets_controller.rb @@ -7,10 +7,9 @@ class Valuation::BudgetsController < Valuation::BaseController def index @budget = current_budget if @budget.present? - @investments_with_valuation_open = @budget.investments - .by_valuator(current_user.valuator.try(:id)) - .valuation_open - .count + @investments = @budget.investments + .by_valuator(current_user.valuator) + .valuation_open end end end diff --git a/app/views/valuation/budgets/index.html.erb b/app/views/valuation/budgets/index.html.erb index f1fd302b6..3abc1f3c7 100644 --- a/app/views/valuation/budgets/index.html.erb +++ b/app/views/valuation/budgets/index.html.erb @@ -18,7 +18,7 @@ <%= t("budgets.phase.#{@budget.phase}") %> - <%= @investments_with_valuation_open %> + <%= @investments.count %> <%= link_to t("valuation.budgets.index.evaluate"),