summaryrefslogtreecommitdiff
path: root/lib/gitlab/gon_helper.rb
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-04 14:56:27 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-04 14:56:27 +0100
commitccca73d779ae0e22a86c9586fd52b15a8600b9f3 (patch)
tree7385d9a2019bfa98affe9bc83c0afd7da2fd730d /lib/gitlab/gon_helper.rb
parentc252c03401881fd7dbf7fab984285c402eb31d5f (diff)
parent5f7ebfb9aa023849b8b296bf9cf0f472b886d072 (diff)
downloadgitlab-ce-ccca73d779ae0e22a86c9586fd52b15a8600b9f3.tar.gz
Merge branch 'master' into add-sentry-js-again-with-vue
Diffstat (limited to 'lib/gitlab/gon_helper.rb')
-rw-r--r--lib/gitlab/gon_helper.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index 70ffb68c9ab..956e80b4a09 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -3,13 +3,13 @@ include SentryHelper
module Gitlab
module GonHelper
def add_gon_variables
- gon.api_version = API::API.version
- gon.default_avatar_url = URI::join(Gitlab.config.gitlab.url, ActionController::Base.helpers.image_path('no_avatar.png')).to_s
+ gon.api_version = 'v4'
+ gon.default_avatar_url = URI.join(Gitlab.config.gitlab.url, ActionController::Base.helpers.image_path('no_avatar.png')).to_s
gon.max_file_size = current_application_settings.max_attachment_size
+ gon.asset_host = ActionController::Base.asset_host
gon.relative_url_root = Gitlab.config.gitlab.relative_url_root
gon.shortcuts_path = help_page_path('shortcuts')
gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class
- gon.award_menu_url = emojis_path
gon.katex_css_url = ActionController::Base.helpers.asset_path('katex.css')
gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js')
gon.sentry_dsn = sentry_dsn_public if sentry_enabled?
@@ -20,6 +20,7 @@ module Gitlab
if current_user
gon.current_user_id = current_user.id
gon.current_username = current_user.username
+ gon.current_user_fullname = current_user.name
end
end
end