diff --git a/app/models/project.rb b/app/models/project.rb index 34d033efa..410cb2154 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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})"