Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11958 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3e9aeea75d
commit
2113b88db3
|
@ -46,7 +46,7 @@ module Redmine
|
||||||
# Removes user from the watchers list
|
# Removes user from the watchers list
|
||||||
def remove_watcher(user)
|
def remove_watcher(user)
|
||||||
return nil unless user && user.is_a?(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
|
end
|
||||||
|
|
||||||
# Adds/removes watcher
|
# Adds/removes watcher
|
||||||
|
|
Loading…
Reference in New Issue