Commit 674efd38d83d6f805d2ed9637028d195470b309b

Authored by Dmitriy Zaporozhets
1 parent cc0295b7

Fix 500 error on services page. Fixed active project tab when on services

app/helpers/tab_helper.rb
@@ -72,7 +72,7 @@ module TabHelper @@ -72,7 +72,7 @@ module TabHelper
72 return "active" if current_page?(controller: "projects", action: action, id: @project) 72 return "active" if current_page?(controller: "projects", action: action, id: @project)
73 end 73 end
74 74
75 - if ['snippets', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name 75 + if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
76 "active" 76 "active"
77 end 77 end
78 end 78 end
app/views/services/index.html.haml
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 GitLab CI 9 GitLab CI
10 %small Continuous integration server from GitLab 10 %small Continuous integration server from GitLab
11 .right 11 .right
12 - - if @gitlab_ci_service.active 12 + - if @gitlab_ci_service.try(:active)
13 %small.cgreen Enabled 13 %small.cgreen Enabled
14 - else 14 - else
15 %small.cgray Disabled 15 %small.cgray Disabled