summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index a116a9354cb..b5a72d535d9 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -67,8 +67,6 @@ class Issue < ActiveRecord::Base
# Thus it will automatically generate a new fragment
# when the event is updated because the key changes.
def reset_events_cache
- Event.where(target_id: self.id, target_type: 'Issue').
- order('id DESC').limit(100).
- update_all(updated_at: Time.now)
+ Event.reset_event_cache_for(self)
end
end