Makes the project list multi-level.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2255 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-10 18:06:14 +00:00
parent c0e6711826
commit 24441b12e1
4 changed files with 18 additions and 12 deletions
+1
View File
@@ -67,6 +67,7 @@ class Project < ActiveRecord::Base
named_scope :has_module, lambda { |mod| { :conditions => ["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s] } }
named_scope :active, { :conditions => "#{Project.table_name}.status = #{STATUS_ACTIVE}"}
named_scope :visible, lambda { { :conditions => Project.visible_by(User.current) } }
def identifier=(identifier)
super unless identifier_frozen?