summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-12-21 17:41:33 +0100
committerJames Lopez <james@jameslopez.es>2017-01-03 13:01:46 +0100
commit112f47057275312daa876bee5bd74d5464410bc5 (patch)
tree257495d658a39b8e31c3407498ec248cb97976a6 /app/models/project.rb
parentde25604fbca2f7005754d821d571bbcb1cc510ac (diff)
downloadgitlab-ce-fix/cross-project-ref-path.tar.gz
Fix cross-project references copy to include the project referencefix/cross-project-ref-path
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index e0ffa7e7af7..11ca09668e0 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -589,8 +589,8 @@ class Project < ActiveRecord::Base
end
end
- def to_reference(from_project = nil)
- if cross_namespace_reference?(from_project)
+ def to_reference(from_project = nil, full: false)
+ if full || cross_namespace_reference?(from_project)
path_with_namespace
elsif cross_project_reference?(from_project)
path