summaryrefslogtreecommitdiff
path: root/app/models/concerns/noteable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/concerns/noteable.rb')
-rw-r--r--app/models/concerns/noteable.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/noteable.rb b/app/models/concerns/noteable.rb
index ea4fe5b27dc..c1aac235d33 100644
--- a/app/models/concerns/noteable.rb
+++ b/app/models/concerns/noteable.rb
@@ -176,7 +176,7 @@ module Noteable
Gitlab::Routing.url_helpers.project_noteable_notes_path(
project,
- target_type: self.class.name.underscore,
+ target_type: noteable_target_type_name,
target_id: id
)
end
@@ -201,6 +201,10 @@ module Noteable
project_email.sub('@', "-#{iid}@")
end
+ def noteable_target_type_name
+ model_name.singular
+ end
+
private
# Synthetic system notes don't have discussion IDs because these are generated dynamically