summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Albuquerque <bga@bug-br.org.br>2013-12-30 17:44:11 -0500
committerBruno Albuquerque <bga@bug-br.org.br>2013-12-30 17:44:11 -0500
commitee3046f9a9f496b84b6b1e5e0d17dc69cecc72ff (patch)
tree32394eda300c6d38c02593ec63c9fce263b71ec6
parent9393809066c10d1568e75372a8c99c3a67bed489 (diff)
downloadgitlab-ce-ee3046f9a9f496b84b6b1e5e0d17dc69cecc72ff.tar.gz
Use web_url for web_url_without_scheme.
- Previus version was still incorrect as it ignored cases where GitLab would be installed in a custom location. - This assumes that if this method can be calle, web_url will return a valid URL.
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 1384165231c..add54eb898b 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -202,7 +202,7 @@ class Project < ActiveRecord::Base
end
def web_url_without_scheme
- [Gitlab.config.gitlab.host, path_with_namespace].join("/")
+ web_url.split("://")[1]
end
def build_commit_note(commit)