Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-04-03 19:03:00 +0300
committerFatih Acet <acetfatih@gmail.com>2018-04-03 19:03:00 +0300
commit65664c2eaeed853396c97a9b46e404c05209c42e (patch)
treee903e3afa6fe5c0f3492dc443776ebd1ce8ade57 /app/models/note.rb
parent67ca10f33ec41e7cecac152e016aa2c0956a7586 (diff)
Refactor discussions/notes code
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 787a80f0196..0f5fb529a87 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -379,12 +379,15 @@ class Note < ActiveRecord::Base
def expire_etag_cache
return unless noteable&.discussions_rendered_on_frontend?
- key = Gitlab::Routing.url_helpers.project_noteable_notes_path(
+ Gitlab::EtagCaching::Store.new.touch(etag_key)
+ end
+
+ def etag_key
+ Gitlab::Routing.url_helpers.project_noteable_notes_path(
project,
target_type: noteable_type.underscore,
target_id: noteable_id
)
- Gitlab::EtagCaching::Store.new.touch(key)
end
def touch(*args)