Replaces #active_children with nested scopes #descendants.active

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2152 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-20 14:38:02 +00:00
parent 89ecc00326
commit 76462d76b5
7 changed files with 11 additions and 15 deletions
@@ -34,7 +34,7 @@ class SearchController < ApplicationController
when 'my_projects'
User.current.memberships.collect(&:project)
when 'subprojects'
@project ? ([ @project ] + @project.active_children) : nil
@project ? (@project.self_and_descendants.active) : nil
else
@project
end