diff options
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 65638d9a299..d8826b65fcc 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -97,10 +97,11 @@ class Issue < ActiveRecord::Base end end - def to_reference(from_project = nil, full: false) + # `from` argument can be a Namespace or Project. + def to_reference(from = nil, full: false) reference = "#{self.class.reference_prefix}#{iid}" - "#{project.to_reference(from_project, full: full)}#{reference}" + "#{project.to_reference(from, full: full)}#{reference}" end def referenced_merge_requests(current_user = nil) |