Support for subforums (#3831).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10142 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-07-31 17:17:52 +00:00
parent 9554f0133f
commit bc153cb61d
18 changed files with 210 additions and 14 deletions

View File

@@ -74,7 +74,7 @@ module ActiveRecord
#
# root.descendants # => [child1, subchild1, subchild2]
def descendants
children + children.collect(&:children).flatten
children + children.collect(&:descendants).flatten
end
# Returns list of descendants and a reference to the current node.