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:
authorDouwe Maan <douwe@selenight.nl>2016-08-17 20:14:44 +0300
committerDouwe Maan <douwe@selenight.nl>2016-08-17 20:16:46 +0300
commit4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b (patch)
tree17554a901009603f52be08914636495b06db2e68 /app/helpers/notes_helper.rb
parentf3acf9fd248a16665a114bf6cce761e9277c2d5b (diff)
Store discussion_id on Note for faster discussion lookup.
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r--app/helpers/notes_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 6b00ebc98e7..da230f76bae 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -49,7 +49,7 @@ module NotesHelper
}
if use_legacy_diff_note
- discussion_id = LegacyDiffNote.build_discussion_id(
+ discussion_id = LegacyDiffNote.discussion_id(
@comments_target[:noteable_type],
@comments_target[:noteable_id] || @comments_target[:commit_id],
line_code
@@ -57,10 +57,10 @@ module NotesHelper
data.merge!(
note_type: LegacyDiffNote.name,
- discussion_id: Digest::SHA1.hexdigest(discussion_id)
+ discussion_id: discussion_id
)
else
- discussion_id = DiffNote.build_discussion_id(
+ discussion_id = DiffNote.discussion_id(
@comments_target[:noteable_type],
@comments_target[:noteable_id] || @comments_target[:commit_id],
position
@@ -69,7 +69,7 @@ module NotesHelper
data.merge!(
position: position.to_json,
note_type: DiffNote.name,
- discussion_id: Digest::SHA1.hexdigest(discussion_id)
+ discussion_id: discussion_id
)
end