Use acts_as_nested_set instead of acts_as_tree for project hierarchy.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2149 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-20 12:22:38 +00:00
parent 04fea923a4
commit 058e4db223
25 changed files with 1758 additions and 5 deletions
@@ -46,8 +46,7 @@ class ProjectsController < ApplicationController
# Lists visible projects
def index
projects = Project.find :all,
:conditions => Project.visible_by(User.current),
:include => :parent
:conditions => Project.visible_by(User.current)
respond_to do |format|
format.html {
@project_tree = projects.group_by {|p| p.parent || p}