From b62d6a1fe28ad040e96fd88604131f357e5e6e9e Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Tue, 25 Sep 2012 23:34:26 -0400
Subject: Remove commit_tab_class helper

---
 app/helpers/tab_helper.rb                 | 6 ------
 app/views/layouts/_project_menu.html.haml | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

(limited to 'app')

diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index 9491e277a02..c26e3467511 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -51,12 +51,6 @@ module TabHelper
     end
   end
 
-  def commit_tab_class
-    if ['commits', 'repositories', 'protected_branches'].include? controller.controller_name
-      "active"
-    end
-  end
-
   def branches_tab_class
     if current_page?(branches_project_repository_path(@project)) ||
       controller.controller_name == "protected_branches" ||
diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml
index e2575646453..5a662a45b08 100644
--- a/app/views/layouts/_project_menu.html.haml
+++ b/app/views/layouts/_project_menu.html.haml
@@ -6,7 +6,7 @@
     - if can? current_user, :download_code, @project
       %li{class: current_controller?(:tree, :blob, :blame) ? 'active' : ''}
         = link_to 'Files', project_tree_path(@project, @project.root_ref)
-      %li{class: commit_tab_class}
+      %li{class: current_controller?(:commit, :commits, :compare, :repositories, :protected_branches) ? 'active' : ''}
         = link_to "Commits", project_commits_path(@project, @project.root_ref)
       %li{class: tab_class(:network)}
         = link_to "Network", graph_project_path(@project)
-- 
cgit v1.2.1