Commit ee3046f9a9f496b84b6b1e5e0d17dc69cecc72ff
1 parent
93938090
Exists in
spb-stable
and in
3 other branches
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.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/project.rb
@@ -202,7 +202,7 @@ class Project < ActiveRecord::Base | @@ -202,7 +202,7 @@ class Project < ActiveRecord::Base | ||
202 | end | 202 | end |
203 | 203 | ||
204 | def web_url_without_scheme | 204 | def web_url_without_scheme |
205 | - [Gitlab.config.gitlab.host, path_with_namespace].join("/") | 205 | + web_url.split("://")[1] |
206 | end | 206 | end |
207 | 207 | ||
208 | def build_commit_note(commit) | 208 | def build_commit_note(commit) |