summaryrefslogtreecommitdiff
path: root/app/helpers/tab_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r--app/helpers/tab_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index 96a83671009..563ddd2a511 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -95,7 +95,9 @@ module TabHelper
end
def project_tab_class
- return "active" if current_page?(controller: "/projects", action: :edit, id: @project)
+ if controller.controller_path.start_with?('projects')
+ return 'active'
+ end
if ['services', 'hooks', 'deploy_keys', 'protected_branches'].include? controller.controller_name
"active"
@@ -112,7 +114,7 @@ module TabHelper
end
def profile_tab_class
- if controller.controller_path =~ /\Aprofiles/
+ if controller.controller_path.start_with?('profiles')
return 'active'
end