From 1a0518904e779ea0131f5282a7e3fef20049b373 Mon Sep 17 00:00:00 2001 From: edwin-jebaraj Date: Thu, 9 Jan 2025 11:42:05 +0000 Subject: [PATCH] updated find_by method with find_by! to raise an exception --- app/controllers/evaluation/tasks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/evaluation/tasks_controller.rb b/app/controllers/evaluation/tasks_controller.rb index ab0618d2e..f9aae0147 100644 --- a/app/controllers/evaluation/tasks_controller.rb +++ b/app/controllers/evaluation/tasks_controller.rb @@ -13,7 +13,7 @@ def show; end private helper_method def current_evaluator - @current_evaluator ||= Support::Evaluator.find_by(support_case_id: params[:id], email: current_user.email) + @current_evaluator ||= Support::Evaluator.find_by!(support_case_id: params[:id], email: current_user.email) end def set_current_case