summaryrefslogtreecommitdiff
path: root/app/models/discussion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/discussion.rb')
-rw-r--r--app/models/discussion.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/discussion.rb b/app/models/discussion.rb
index 32529ebf71d..ae13cdfd85f 100644
--- a/app/models/discussion.rb
+++ b/app/models/discussion.rb
@@ -4,6 +4,7 @@
#
# A discussion of this type can be resolvable.
class Discussion
+ include GlobalID::Identification
include ResolvableDiscussion
attr_reader :notes, :context_noteable
@@ -11,14 +12,19 @@ class Discussion
delegate :created_at,
:project,
:author,
-
:noteable,
:commit_id,
:for_commit?,
:for_merge_request?,
+ :to_ability_name,
+ :editable?,
to: :first_note
+ def declarative_policy_delegate
+ first_note
+ end
+
def project_id
project&.id
end