]> source.dussan.org Git - redmine.git/commitdiff
code format cleanup Watcher model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 07:41:34 +0000 (07:41 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 07:41:34 +0000 (07:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12568 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/watcher.rb

index 3a37aa3238620bf699a123cb445c2eaab4490f5f..1b887376c5e37f0b270f85ca0bf9a0d31d0f7a4c 100644 (file)
@@ -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