Fixes budget_helper issues

This commit is contained in:
kikito
2016-12-02 20:10:42 +01:00
parent 98549d8e61
commit dee409cfc8
2 changed files with 29 additions and 31 deletions

View File

@@ -11,13 +11,11 @@ module BudgetHelper
end
def namespaced_budget_investment_path(investment, options={})
@namespaced_budget_investment_path ||= namespace
options[:budget_id] ||= investment.budget.id
case @namespace_budget_investment_path
when "management"
case namespace
when "management::budgets"
management_budgets_investment_path(investment, options)
else
budget_investment_path(investment, options)
budget_investment_path(investment, options.merge(budget_id: investment.budget_id))
end
end