diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-13 16:31:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-13 16:31:11 +0000 |
commit | cc643ce932b2abdc56c4d1933c02806ca57ddefa (patch) | |
tree | eeaaba02f0eee8ce2d06a10609ccffebdfb1ee4d /app/models/project.rb | |
parent | 6ef6459630cfd8fd5af31d527c0043243ef2cb09 (diff) | |
download | redmine-cc643ce932b2abdc56c4d1933c02806ca57ddefa.tar.gz redmine-cc643ce932b2abdc56c4d1933c02806ca57ddefa.zip |
Merged nbc branch @ r1812 (commit access permission and reposman improvements).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1814 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index adc70c644..e40af9967 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -62,6 +62,8 @@ class Project < ActiveRecord::Base validates_format_of :identifier, :with => /^[a-z0-9\-]*$/ before_destroy :delete_all_members + + 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] } } def identifier=(identifier) super unless identifier_frozen? |