aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-11-06 18:50:24 -0500
committerRaghuram Subramani <raghus2247@gmail.com>2025-11-06 18:50:48 -0500
commitba227a71b3b5d91d8c890ed8f1c71f6944d5a679 (patch)
tree8960e5ed707c67837b06fed0254d29b8904727ce
parente62b697154016bee66d2381317622dad6ce23f2e (diff)
clients: early return on client not found
-rw-r--r--app/controllers/clients_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb
index 6c18381..84596f0 100644
--- a/app/controllers/clients_controller.rb
+++ b/app/controllers/clients_controller.rb
@@ -21,7 +21,7 @@ class ClientsController < ApplicationController
.find_by(uuid: params[:uuid])
if @client.nil?
- redirect_back fallback_location: dashboard_index_path, alert: 'Client not found!'
+ return redirect_back fallback_location: dashboard_index_path, alert: 'Client not found!'
end
end
@@ -59,7 +59,7 @@ class ClientsController < ApplicationController
.find_by(uuid: params[:uuid])
if @client.nil?
- redirect_back fallback_location: dashboard_index_path, alert: 'Client not found!'
+ return redirect_back fallback_location: dashboard_index_path, alert: 'Client not found!'
end
@household_member_counts = @client.household_members.group(:member_type).count