From 3f6e88204fd96a1a5bef3509bc7d701f02473f4e Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 9 Jun 2022 07:50:18 +0100 Subject: [PATCH] added feature flag to hide supported services on prod --- app/helpers/navigation_items_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/navigation_items_helper.rb b/app/helpers/navigation_items_helper.rb index 5b0e42c20..d4f5d1559 100644 --- a/app/helpers/navigation_items_helper.rb +++ b/app/helpers/navigation_items_helper.rb @@ -3,12 +3,14 @@ module NavigationItemsHelper def primary_items(path, current_user) if current_user.support? - [ + nav_items = [ NavigationItem.new("Organisations", organisations_path, organisations_current?(path)), NavigationItem.new("Users", "/users", users_current?(path)), NavigationItem.new("Logs", case_logs_path, logs_current?(path)), NavigationItem.new("Supported housing", "/supported-housing", supported_housing_current?(path)), ] + + Rails.env.production? ? nav_items[0...-1] : nav_items else [ NavigationItem.new("Logs", case_logs_path, logs_current?(path)),