1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-29 19:59:38 +00:00

Use projects association.

git-svn-id: http://svn.redmine.org/redmine/trunk@13744 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-12-13 11:09:42 +00:00
parent ed1f13c97f
commit b8d2d35e95

View File

@ -29,7 +29,7 @@ class SearchController < ApplicationController
when 'all'
nil
when 'my_projects'
User.current.memberships.collect(&:project)
User.current.projects
when 'subprojects'
@project ? (@project.self_and_descendants.active.to_a) : nil
else