diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 10:45:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 10:45:34 +0000 |
commit | 4c6dfdf95fcb1ae4b014ea595d1f6d5bad64eb48 (patch) | |
tree | 2c64be72aef40dcbc6a48ad5f46961d846887d6b /app | |
parent | df0b91e2383811cf0987fc65d6bcb8b63541ab2d (diff) | |
download | redmine-4c6dfdf95fcb1ae4b014ea595d1f6d5bad64eb48.tar.gz redmine-4c6dfdf95fcb1ae4b014ea595d1f6d5bad64eb48.zip |
Cleanup dependencies in Project model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10959 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index acd5f5567..742059965 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -28,11 +28,11 @@ class Project < ActiveRecord::Base # Specific overidden Activities has_many :time_entry_activities - has_many :members, :include => [:principal, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}" + has_many :members, :include => [:principal, :roles], :conditions => "#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE}" has_many :memberships, :class_name => 'Member' has_many :member_principals, :class_name => 'Member', :include => :principal, - :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{User::STATUS_ACTIVE})" + :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE})" has_many :users, :through => :members has_many :principals, :through => :member_principals, :source => :principal |