From 9c5301a9f77f87618732bb16acc1941ec1c8946b Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 26 Dec 2018 13:05:31 +0100 Subject: [PATCH] don't show deleted clients --- app/controllers/clients_controller.rb | 1 - app/controllers/data_centers_controller.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index b53b873b1..3fccb4bb3 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -139,7 +139,6 @@ def set_include end def set_client - # params[:id] = params[:id][/.+?(?=\/)/] @client = Client.where(symbol: params[:id]).where(deleted_at: nil).first fail ActiveRecord::RecordNotFound unless @client.present? end diff --git a/app/controllers/data_centers_controller.rb b/app/controllers/data_centers_controller.rb index c30780b02..b55e64a19 100644 --- a/app/controllers/data_centers_controller.rb +++ b/app/controllers/data_centers_controller.rb @@ -90,7 +90,7 @@ def set_include end def set_client - @client = Client.where(symbol: params[:id]).first + @client = Client.where(symbol: params[:id]).where(deleted_at: nil).first fail ActiveRecord::RecordNotFound unless @client.present? end end