From ff13dee918b1d93e969d430b689100abced88ab7 Mon Sep 17 00:00:00 2001 From: kikito Date: Fri, 16 Dec 2016 18:03:36 +0100 Subject: [PATCH] Fixes incorrect path & params in bi controller --- app/controllers/budgets/investments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/budgets/investments_controller.rb b/app/controllers/budgets/investments_controller.rb index c5d410b1d..6ad781da6 100644 --- a/app/controllers/budgets/investments_controller.rb +++ b/app/controllers/budgets/investments_controller.rb @@ -46,7 +46,7 @@ module Budgets if @investment.save activity_link = view_context.link_to(t('layouts.header.my_activity_link'), user_path(current_user, filter: :budget_investments)) - redirect_to @investment, + redirect_to budget_investment_path(@budget, @investment), flash: { html_safe: true }, notice: t('flash.actions.create.budget_investment', activity: activity_link) else @@ -80,7 +80,7 @@ module Budgets end def investment_params - params.require(:investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service) + params.require(:budget_investment).permit(:title, :description, :external_url, :heading_id, :terms_of_service) end def load_ballot