diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-11-06 18:50:24 -0500 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-11-06 18:50:48 -0500 |
| commit | ba227a71b3b5d91d8c890ed8f1c71f6944d5a679 (patch) | |
| tree | 8960e5ed707c67837b06fed0254d29b8904727ce | |
| parent | e62b697154016bee66d2381317622dad6ce23f2e (diff) | |
clients: early return on client not found
| -rw-r--r-- | app/controllers/clients_controller.rb | 4 |
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 |
