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
@@ -0,0 +1,11 @@
class AddProjectsLftAndRgt < ActiveRecord::Migration
def self.up
add_column :projects, :lft, :integer
add_column :projects, :rgt, :integer
end
def self.down
remove_column :projects, :lft
remove_column :projects, :rgt
end
end
@@ -0,0 +1,8 @@
class BuildProjectsTree < ActiveRecord::Migration
def self.up
Project.rebuild!
end
def self.down
end
end