diff options
Diffstat (limited to 'app/models/concerns/note_on_diff.rb')
-rw-r--r-- | app/models/concerns/note_on_diff.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index 1a5a7007a2b..6c27dd5aa5c 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -25,4 +25,18 @@ module NoteOnDiff def diff_attributes raise NotImplementedError end + + def active?(diff_refs = nil) + raise NotImplementedError + end + + private + + def noteable_diff_refs + if noteable.respond_to?(:diff_sha_refs) + noteable.diff_sha_refs + else + noteable.diff_refs + end + end end |