diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-07-16 20:44:24 +0200 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-07-25 22:23:42 +0200 |
commit | 16eea49277e736c53078ec1e7b5005ac7a26a112 (patch) | |
tree | de207b081d949c840dd639c4415d32c01d6a024c /app/models/note.rb | |
parent | de582ab375a1fd04b63ea351aabbff5b31bcad6b (diff) | |
download | gitlab-ce-16eea49277e736c53078ec1e7b5005ac7a26a112.tar.gz |
Moved some behaviour to one place
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index ed4829b2b39..7ff6444cc9b 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -327,9 +327,7 @@ class Note < 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: 'Note'). - order('id DESC').limit(100). - update_all(updated_at: Time.now) + Event.reset_event_cache_for(self) end def set_references |