]> source.dussan.org Git - redmine.git/commitdiff
Load roles when loading project members.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 20 Nov 2009 13:08:17 +0000 (13:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 20 Nov 2009 13:08:17 +0000 (13:08 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3078 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 34d033efa3860a4622358dfaf75ec22f2815b5a5..410cb2154f37c3cc2cef681413f7c2c50a4909f0 100644 (file)
@@ -26,7 +26,7 @@ class Project < ActiveRecord::Base
       find(:all, :conditions => {:active => true})
     end
   end
-  has_many :members, :include => :user, :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
+  has_many :members, :include => [:user, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
   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})"