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