summaryrefslogtreecommitdiffstats
path: root/app/models/watcher.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 07:41:34 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 07:41:34 +0000
commit05aa146fad73c46593240322ad40cd398061c989 (patch)
tree0c0b2f504eeb3bf2716b8202b1bfde5a07f9cd94 /app/models/watcher.rb
parent8a9db2841d84b477c8c439e1d5ebdd3afbbc088a (diff)
downloadredmine-05aa146fad73c46593240322ad40cd398061c989.tar.gz
redmine-05aa146fad73c46593240322ad40cd398061c989.zip
code format cleanup Watcher model
git-svn-id: http://svn.redmine.org/redmine/trunk@12568 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/watcher.rb')
-rw-r--r--app/models/watcher.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/watcher.rb b/app/models/watcher.rb
index 3a37aa323..1b887376c 100644
--- a/app/models/watcher.rb
+++ b/app/models/watcher.rb
@@ -62,11 +62,12 @@ class Watcher < ActiveRecord::Base
pruned = 0
where(:user_id => user.id).all.each do |watcher|
next if watcher.watchable.nil?
-
if options.has_key?(:project)
- next unless watcher.watchable.respond_to?(:project) && watcher.watchable.project == options[:project]
+ unless watcher.watchable.respond_to?(:project) &&
+ watcher.watchable.project == options[:project]
+ next
+ end
end
-
if watcher.watchable.respond_to?(:visible?)
unless watcher.watchable.visible?(user)
watcher.destroy