Fixes incorrect path & params in bi controller

This commit is contained in:
kikito
2016-12-16 18:03:36 +01:00
parent 3bada69dd0
commit ff13dee918

View File

@@ -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