Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10917 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -281,7 +281,7 @@ class MailHandler < ActionMailer::Base
|
||||
if user.allowed_to?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project)
|
||||
addresses = [email.to, email.cc].flatten.compact.uniq.collect {|a| a.strip.downcase}
|
||||
unless addresses.empty?
|
||||
watchers = User.active.find(:all, :conditions => ['LOWER(mail) IN (?)', addresses])
|
||||
watchers = User.active.where('LOWER(mail) IN (?)', addresses).all
|
||||
watchers.each {|w| obj.add_watcher(w)}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user