From c1f2e8fd7a4da2fabdc6fb7e09f1f6d39d7e96e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 31 Oct 2019 16:31:12 +0100 Subject: [PATCH] Use `budget.investments` instead of `by_budget` Same result, with less code. --- app/helpers/budgets_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/budgets_helper.rb b/app/helpers/budgets_helper.rb index 7915b10a3..8f46b1225 100644 --- a/app/helpers/budgets_helper.rb +++ b/app/helpers/budgets_helper.rb @@ -54,13 +54,13 @@ module BudgetsHelper end def investment_tags_select_options(budget) - tags = Budget::Investment.by_budget(budget).tags_on(:valuation).order(:name).pluck(:name) + tags = budget.investments.tags_on(:valuation).order(:name).pluck(:name) tags = tags.concat budget.budget_valuation_tags.split(",") if budget.budget_valuation_tags.present? tags.uniq end def investment_milestone_tags_select_options(budget) - tags = Budget::Investment.by_budget(budget).tags_on(:milestone).order(:name).pluck(:name) + tags = budget.investments.tags_on(:milestone).order(:name).pluck(:name) tags = tags.concat budget.budget_milestone_tags.split(",") if budget.budget_milestone_tags.present? tags.uniq end