Restores acts_as_tree instance methods removed in r10919.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10923 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-02 21:20:27 +00:00
parent 9230628953
commit 7a40e309e4
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ module ActiveRecord
has_many :children, :class_name => name, :foreign_key => configuration[:foreign_key], :order => configuration[:order], :dependent => configuration[:dependent]
scope :roots, where("#{configuration[:foreign_key]} IS NULL").order(configuration[:order])
send :include, ActiveRecord::Acts::Tree::InstanceMethods
end
end