diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-11 18:18:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-11 18:18:02 +0000 |
commit | 2113b88db34bef9ef4af18e766f2a882505ee789 (patch) | |
tree | cba149213180bf00491d14620bc9ec349fa21413 /lib/plugins/acts_as_watchable | |
parent | 3e9aeea75d7fec0f312726d890212262eaf940fa (diff) | |
download | redmine-2113b88db34bef9ef4af18e766f2a882505ee789.tar.gz redmine-2113b88db34bef9ef4af18e766f2a882505ee789.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11958 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins/acts_as_watchable')
-rw-r--r-- | lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb index c284af38d..4ce3bb4a1 100644 --- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb @@ -46,7 +46,7 @@ module Redmine # Removes user from the watchers list def remove_watcher(user) return nil unless user && user.is_a?(User) - Watcher.delete_all "watchable_type = '#{self.class}' AND watchable_id = #{self.id} AND user_id = #{user.id}" + watchers.where(:user_id => user.id).delete_all end # Adds/removes watcher |