diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-09 00:05:50 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-09 00:05:50 +0000 |
commit | facf04593fe5d7a06a58d994b9ff8fe49c906eb9 (patch) | |
tree | 5494997e8431640309308983c6e12b1d0d3528fa /app/models/mail_handler.rb | |
parent | c0e587ffc458f50dd21bcad719e06c6185f7201f (diff) | |
download | redmine-facf04593fe5d7a06a58d994b9ff8fe49c906eb9.tar.gz redmine-facf04593fe5d7a06a58d994b9ff8fe49c906eb9.zip |
remove unneeded Relation#all from MailHandler#add_watchers
git-svn-id: http://svn.redmine.org/redmine/trunk@12542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mail_handler.rb')
-rw-r--r-- | app/models/mail_handler.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 7a4209429..2a16f0fa3 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -296,8 +296,9 @@ 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.where('LOWER(mail) IN (?)', addresses).all - watchers.each {|w| obj.add_watcher(w)} + User.active.where('LOWER(mail) IN (?)', addresses).each do |w| + obj.add_watcher(w) + end end end end |