summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-01-11 10:44:12 -0200
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-01-27 20:20:18 -0200
commit0e14a2f21dbfe20c980562dd47ab9878c023eac2 (patch)
tree33a159c81f5fc120f9128ad6b9087fcc350dccc7 /app/models/merge_request.rb
parent660a755cad8c6540ec4154f4785b1abb67b6beaf (diff)
downloadgitlab-ce-0e14a2f21dbfe20c980562dd47ab9878c023eac2.tar.gz
Add commment to Issue, Project and MergeRequest #to_reference
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 67d4c70dc3a..082adcafcc8 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -179,6 +179,7 @@ class MergeRequest < ActiveRecord::Base
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}"