Unify notice responders for budget investments create action

This commit is contained in:
taitus
2024-11-20 11:06:28 +01:00
parent 1cf85560dd
commit 9d7fa9d0f8
5 changed files with 13 additions and 13 deletions

View File

@@ -26,8 +26,8 @@ class Management::Budgets::InvestmentsController < Management::BaseController
@investment.heading = @budget.headings.first if @budget.single_heading?
if @investment.save
notice = t("flash.actions.create.notice", resource_name: Budget::Investment.model_name.human, count: 1)
redirect_to management_budget_investment_path(@budget, @investment), notice: notice
redirect_to management_budget_investment_path(@budget, @investment),
notice: t("flash.actions.create.budget_investment")
else
render :new
end