diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-30 23:32:09 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-03 22:47:21 +0300 |
commit | f8fabfcc6ff6be4e20e3cc9353be86b7cf53af47 (patch) | |
tree | 15816b09ecdebbd4eb797195b90cb4f46b6819c4 /app/models/diff_note.rb | |
parent | 185fd98fd4cb8f920558aea3795c4e1774cd39f5 (diff) |
Allow commenting on older versions of the diff and comparisons between diff versions
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index abe4518d62a..76c59199afd 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -65,10 +65,11 @@ class DiffNote < Note self.position.diff_refs == diff_refs end - def latest_merge_request_diff - return unless for_merge_request? + def created_at_diff?(diff_refs) + return false unless supported? + return true if for_commit? - self.noteable.merge_request_diff_for(self.position.diff_refs) + self.original_position.diff_refs == diff_refs end private |