Display only current budget to Managers printing investments

In the specs, some investment were missing a heading_id, thus creating
another unexpected budget

By explicitly setting the heading_id we can control better which
budgets are created in each test
This commit is contained in:
rgarcia
2018-01-15 20:26:57 +01:00
parent 349780922d
commit 01ef439053
3 changed files with 10 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ class Management::BudgetsController < Management::BaseController
end
def print_investments
@budgets = Budget.current.order(created_at: :desc).page(params[:page])
@budget = Budget.current
end
private