From 744d8669260b63a94f5cd41c6b79b8396dd47df3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 26 May 2008 20:10:32 +0000 Subject: [PATCH] Moved ProjectsController#list to ProjectsController#index. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1464 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/projects_controller.rb | 7 +------ app/views/projects/{list.rhtml => index.rhtml} | 0 test/functional/projects_controller_test.rb | 8 +------- 3 files changed, 2 insertions(+), 13 deletions(-) rename app/views/projects/{list.rhtml => index.rhtml} (100%) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 07b29fa25..320def41b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -44,13 +44,8 @@ class ProjectsController < ApplicationController include RepositoriesHelper include ProjectsHelper - def index - list - render :action => 'list' unless request.xhr? - end - # Lists visible projects - def list + def index projects = Project.find :all, :conditions => Project.visible_by(User.current), :include => :parent diff --git a/app/views/projects/list.rhtml b/app/views/projects/index.rhtml similarity index 100% rename from app/views/projects/list.rhtml rename to app/views/projects/index.rhtml diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 82b5bdeb6..d4ce97dc2 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -35,13 +35,7 @@ class ProjectsControllerTest < Test::Unit::TestCase def test_index get :index assert_response :success - assert_template 'list' - end - - def test_list - get :list - assert_response :success - assert_template 'list' + assert_template 'index' assert_not_nil assigns(:project_tree) # Root project as hash key assert assigns(:project_tree).has_key?(Project.find(1)) -- 2.39.5