From 05e4831f94c09cdd3ee511d4d4ef48676d1cf927 Mon Sep 17 00:00:00 2001 From: JG Date: Wed, 8 Jun 2022 08:14:37 +0100 Subject: [PATCH] refactored name --- app/helpers/title_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/title_helper.rb b/app/helpers/title_helper.rb index 7c4187e2b..25dcbc30c 100644 --- a/app/helpers/title_helper.rb +++ b/app/helpers/title_helper.rb @@ -5,16 +5,16 @@ module TitleHelper def format_title(searched, page_title, current_user, item_label, count, organisation_name) if searched.present? - actual_title = support_user_sab_nav?(current_user, organisation_name) ? organisation_name : page_title + actual_title = support_sab_nav?(current_user, organisation_name) ? organisation_name : page_title "#{actual_title} (#{count} #{item_label} matching ‘#{searched}’)" else - support_user_sab_nav?(current_user, organisation_name) ? "#{organisation_name} (#{page_title})" : page_title + support_sab_nav?(current_user, organisation_name) ? "#{organisation_name} (#{page_title})" : page_title end end private - def support_user_sab_nav?(current_user, organisation_name) + def support_sab_nav?(current_user, organisation_name) current_user.support? && organisation_name end end