@@ -57,7 +57,7 class Principal < ActiveRecord::Base | |||||
57 | where("1=0") |
|
57 | where("1=0") | |
58 | else |
|
58 | else | |
59 | ids = projects.map(&:id) |
|
59 | ids = projects.map(&:id) | |
60 | active.where("#{Principal.table_name}.id IN (SELECT DISTINCT user_id FROM #{Member.table_name} WHERE project_id IN (?))", ids) |
|
60 | active.uniq.joins(:members).where("#{Member.table_name}.project_id IN (?)", ids) | |
61 | end |
|
61 | end | |
62 | } |
|
62 | } | |
63 | # Principals that are not members of projects |
|
63 | # Principals that are not members of projects |
General Comments 0
You need to be logged in to leave comments.
Login now