diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-17 22:25:52 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 19:44:14 +0300 |
commit | 79889a6aa3dc878d196d0f2f445ab6b10ef10c74 (patch) | |
tree | 25367a69b4a529335e106d0d65c2d9a38e97f092 /app/models/out_of_context_discussion.rb | |
parent | 80b2e18fb62b8da7410f90b3e5340b9e63e765a3 (diff) |
Add specs
Diffstat (limited to 'app/models/out_of_context_discussion.rb')
-rw-r--r-- | app/models/out_of_context_discussion.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/out_of_context_discussion.rb b/app/models/out_of_context_discussion.rb new file mode 100644 index 00000000000..0019064e25c --- /dev/null +++ b/app/models/out_of_context_discussion.rb @@ -0,0 +1,12 @@ +class OutOfContextDiscussion < Discussion + # To make sure all out-of-context notes are displayed in one discussion, + # we override the discussion ID to be a newly generated but consistent ID. + def self.override_discussion_id(note) + discussion_id(note) + end + + # Keep this method in sync with the `potentially_resolvable` scope on `ResolvableNote` + def potentially_resolvable? + false + end +end |