Commit 0e14a2f2 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira
Browse files

Add commment to Issue, Project and MergeRequest #to_reference

parent a7de12528c2d
......@@ -97,6 +97,7 @@ def self.sort(method, excluded_labels: [])
end
end
# `from` argument can be a Namespace or Project.
def to_reference(from = nil, full: false)
reference = "#{self.class.reference_prefix}#{iid}"
......
......@@ -179,6 +179,7 @@ def self.wip_title(title)
work_in_progress?(title) ? title : "WIP: #{title}"
end
# `from` argument can be a Namespace or Project.
def to_reference(from = nil, full: false)
reference = "#{self.class.reference_prefix}#{iid}"
......
......@@ -591,6 +591,7 @@ def to_param
end
end
# `from` argument can be a Namespace or Project.
def to_reference(from = nil, full: false)
if full || cross_namespace_reference?(from)
path_with_namespace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment