diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-19 12:38:40 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-19 12:38:40 -0500 |
commit | 080924f979df39ad96eb1ab4a029d032bcba6e86 (patch) | |
tree | 2451fa0f6a8d0eb82b42789b40150f6a13243910 /app/models/diff_note.rb | |
parent | 8d3ef366222423a295fed676bdddd1060071320e (diff) | |
download | gitlab-ce-080924f979df39ad96eb1ab4a029d032bcba6e86.tar.gz |
Fix bug where notes weren’t shown in discussion when the code had changed after creation
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index f56c3d74ae3..aa54189fea9 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -57,6 +57,10 @@ class DiffNote < Note diff_file.position(line) == self.original_position end + def original_line_code + self.diff_file.line_code(self.diff_line) + end + def active?(diff_refs = nil) return false unless supported? return true if for_commit? |