diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-09 07:41:50 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-09 07:41:50 +0000 |
commit | 6dbb9c3677c39c43132c54aa0234c6929bf40b62 (patch) | |
tree | f2864a5b9900ee8fdda9c5e47946538bbdd0cd90 /app/models/watcher.rb | |
parent | 05aa146fad73c46593240322ad40cd398061c989 (diff) | |
download | redmine-6dbb9c3677c39c43132c54aa0234c6929bf40b62.tar.gz redmine-6dbb9c3677c39c43132c54aa0234c6929bf40b62.zip |
remove unneeded Relation#all from Watcher#prune_single_user
git-svn-id: http://svn.redmine.org/redmine/trunk@12569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/watcher.rb')
-rw-r--r-- | app/models/watcher.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/watcher.rb b/app/models/watcher.rb index 1b887376c..53756603c 100644 --- a/app/models/watcher.rb +++ b/app/models/watcher.rb @@ -60,7 +60,7 @@ class Watcher < ActiveRecord::Base def self.prune_single_user(user, options={}) return unless user.is_a?(User) pruned = 0 - where(:user_id => user.id).all.each do |watcher| + where(:user_id => user.id).each do |watcher| next if watcher.watchable.nil? if options.has_key?(:project) unless watcher.watchable.respond_to?(:project) && |