Commit ff0957c5 authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch 'js_should_user_right_api_version' into 'master'

The frontend should use the v3 API for now

Closes #28863 and #28853

See merge request !9614
module Gitlab module Gitlab
module GonHelper module GonHelper
def add_gon_variables def add_gon_variables
gon.api_version = API::API.version gon.api_version = 'v3' # v4 Is not officially released yet, therefore can't be considered as "frozen"
gon.default_avatar_url = URI.join(Gitlab.config.gitlab.url, ActionController::Base.helpers.image_path('no_avatar.png')).to_s 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.max_file_size = current_application_settings.max_attachment_size
gon.relative_url_root = Gitlab.config.gitlab.relative_url_root gon.relative_url_root = Gitlab.config.gitlab.relative_url_root
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment