Use eager loaded #principal association instead of #user (#11904).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10441 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7c8ac2eecc
commit
5ce2f4f81c
|
@ -472,7 +472,7 @@ class Project < ActiveRecord::Base
|
||||||
# Returns the users that should be notified on project events
|
# Returns the users that should be notified on project events
|
||||||
def notified_users
|
def notified_users
|
||||||
# TODO: User part should be extracted to User#notify_about?
|
# TODO: User part should be extracted to User#notify_about?
|
||||||
members.select {|m| m.mail_notification? || m.user.mail_notification == 'all'}.collect {|m| m.user}
|
members.select {|m| m.mail_notification? || m.user.mail_notification == 'all'}.collect {|m| m.principal}
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns an array of all custom fields enabled for project issues
|
# Returns an array of all custom fields enabled for project issues
|
||||||
|
|
Loading…
Reference in New Issue