gitlab-org--gitlab-foss/app/models/out_of_context_discussion.rb

20 lines
661 B
Ruby
Raw Normal View History

2017-04-04 22:27:23 +00:00
# When notes on a commit are displayed in the context of a merge request that contains that commit,
# they are displayed as if they were a discussion.
# This represents one of those discussions, consisting of `Note` notes.
2017-03-17 19:25:52 +00:00
class OutOfContextDiscussion < Discussion
2017-04-04 22:27:23 +00:00
# Returns an array of discussion ID components
def self.build_discussion_id(note)
base_discussion_id(note)
end
# To make sure all out-of-context notes end up grouped as one discussion,
2017-03-17 19:25:52 +00:00
# we override the discussion ID to be a newly generated but consistent ID.
def self.override_discussion_id(note)
2017-04-04 22:27:23 +00:00
discussion_id(note)
2017-03-17 19:25:52 +00:00
end
def potentially_resolvable?
false
end
end