|
|
|
@ -12,7 +12,7 @@ class ProjectStatus < ActiveRecord::Base
|
|
|
|
|
# 但是 如果超级用户删除其他用户的话会造成读取错误 这里是遗漏点
|
|
|
|
|
# 删除用户时 此表创建人员未作相应删除动作
|
|
|
|
|
def update_watchers_count(num)
|
|
|
|
|
if self.watchers_count >= 0
|
|
|
|
|
if self.watchers_count||0 >= 0
|
|
|
|
|
self.update_attribute(:watchers_count, self.watchers_count.to_i + num)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|