Commit 703e424d authored by Zack Cuddy's avatar Zack Cuddy Committed by Michael Kozono

Remove unused project_tab_class

Defined, but no longer used
parent 28b0b4dd
...@@ -108,16 +108,6 @@ module TabHelper ...@@ -108,16 +108,6 @@ module TabHelper
current_controller?(c) && current_action?(a) current_controller?(c) && current_action?(a)
end end
def project_tab_class
if controller.controller_path.start_with?('projects')
return 'active'
end
if %w(services hooks deploy_keys protected_branches).include? controller.controller_name
"active"
end
end
def branches_tab_class def branches_tab_class
if current_controller?(:protected_branches) || if current_controller?(:protected_branches) ||
current_controller?(:branches) || current_controller?(:branches) ||
...@@ -125,14 +115,6 @@ module TabHelper ...@@ -125,14 +115,6 @@ module TabHelper
'active' 'active'
end end
end end
def profile_tab_class
if controller.controller_path.start_with?('profiles')
return 'active'
end
'active' if current_controller?('oauth/applications')
end
end end
TabHelper.prepend_if_ee('EE::TabHelper') TabHelper.prepend_if_ee('EE::TabHelper')
...@@ -4,15 +4,6 @@ module EE ...@@ -4,15 +4,6 @@ module EE
module TabHelper module TabHelper
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
override :project_tab_class
def project_tab_class
if controller.controller_name == 'push_rules'
'active'
else
super
end
end
def analytics_controllers def analytics_controllers
['analytics/productivity_analytics', 'analytics/cycle_analytics'] ['analytics/productivity_analytics', 'analytics/cycle_analytics']
end end
......
# frozen_string_literal: true
require 'spec_helper'
describe TabHelper do
describe '#project_tab_class' do
it 'returns "active" for the push rules controller' do
controller = instance_double(
'controller',
controller_name: 'push_rules',
controller_path: '/push_rules/foo'
)
allow(helper)
.to receive(:controller)
.and_return(controller)
expect(helper.project_tab_class).to eq('active')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment