]> source.dussan.org Git - redmine.git/commitdiff
Avoid to run one SQL query per member on Project#assignable_users (#11904).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 22 Sep 2012 09:33:30 +0000 (09:33 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 22 Sep 2012 09:33:30 +0000 (09:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10440 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 5503cbb76cfa8ebbf0f2c29715379a43f71a3338..f30832ee9921ee48fb4a217f3e25ea0e0e769a6a 100644 (file)
@@ -28,7 +28,7 @@ class Project < ActiveRecord::Base
 
   # Specific overidden Activities
   has_many :time_entry_activities
-  has_many :members, :include => [:user, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
+  has_many :members, :include => [:principal, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
   has_many :memberships, :class_name => 'Member'
   has_many :member_principals, :class_name => 'Member',
                                :include => :principal,