From 0d761ddfb1f579b531aa4579f9c061f3cd93c7d0 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Thu, 13 Jul 2017 19:29:30 +0200 Subject: [PATCH] Hotfixing find the only budget for emails --- app/controllers/budgets/results_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/budgets/results_controller.rb b/app/controllers/budgets/results_controller.rb index e8e80a234..e44a38cd9 100644 --- a/app/controllers/budgets/results_controller.rb +++ b/app/controllers/budgets/results_controller.rb @@ -14,7 +14,7 @@ module Budgets private def load_budget - @budget = Budget.find_by(id: params[:budget_id]) + @budget = Budget.find_by(id: params[:budget_id]) || Budget.first end def load_heading