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:
parent
9230628953
commit
7a40e309e4
@ -47,6 +47,8 @@ module ActiveRecord
|
|||||||
has_many :children, :class_name => name, :foreign_key => configuration[:foreign_key], :order => configuration[:order], :dependent => configuration[:dependent]
|
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])
|
scope :roots, where("#{configuration[:foreign_key]} IS NULL").order(configuration[:order])
|
||||||
|
|
||||||
|
send :include, ActiveRecord::Acts::Tree::InstanceMethods
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user