diff options
author | Andrey Vakarev <avakarev@gmail.com> | 2012-06-03 03:58:49 +0300 |
---|---|---|
committer | Andrey Vakarev <avakarev@gmail.com> | 2012-06-03 03:58:49 +0300 |
commit | fb4b571fa66f985bb9366944f63481c9937b5523 (patch) | |
tree | dd331afcc69fdcc5d571acdfdaeb17f817a59d38 /app/helpers/tab_helper.rb | |
parent | cbea0af2907d9bff641ce3cd215594dfb6a2ab94 (diff) | |
download | gitlab-ce-fb4b571fa66f985bb9366944f63481c9937b5523.tar.gz |
Clean up tab_helper.rb code
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r-- | app/helpers/tab_helper.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 091853b66c3..fa5ca166d6b 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -12,23 +12,17 @@ module TabHelper return "current" if current_page?(:controller => "projects", :action => action, :id => @project) end - if controller.controller_name == "snippets" || - controller.controller_name == "hooks" || - controller.controller_name == "deploy_keys" || - controller.controller_name == "team_members" + if ['snippets', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name "current" end end def tree_tab_class - controller.controller_name == "refs" ? - "current" : nil + controller.controller_name == "refs" ? "current" : nil end def commit_tab_class - if controller.controller_name == "commits" || - controller.controller_name == "repositories" || - controller.controller_name == "protected_branches" + if ['commits', 'repositories', 'protected_branches'].include? controller.controller_name "current" end end @@ -37,7 +31,7 @@ module TabHelper if current_page?(branches_project_repository_path(@project)) || controller.controller_name == "protected_branches" || current_page?(project_repository_path(@project)) - 'active' + 'active' end end end |