From 529376bb0b42a68fb9b459203efd547c3931861c Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Wed, 24 Apr 2013 09:31:36 +0200 Subject: [PATCH] [BUGFIX] User suggest at team_members/new not working with relative_url_root * Closing #3540 * Closing #3704 --- app/assets/javascripts/api.js.coffee | 1 + app/controllers/application_controller.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/assets/javascripts/api.js.coffee b/app/assets/javascripts/api.js.coffee index ca721517867..7cac971f247 100644 --- a/app/assets/javascripts/api.js.coffee +++ b/app/assets/javascripts/api.js.coffee @@ -50,4 +50,5 @@ callback(users) buildUrl: (url) -> + url = gon.relative_url_root + url if gon.relative_url_root.present? return url.replace(':version', gon.api_version) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 32b1246601d..22fe5abacb3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -155,5 +155,6 @@ class ApplicationController < ActionController::Base gon.api_version = Gitlab::API.version gon.api_token = current_user.private_token if current_user gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url + gon.relative_url_root = Gitlab.config.gitlab.relative_url_root end end -- GitLab