summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-14 10:16:27 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-14 10:16:27 +0200
commitef05423f47fdd970498d880cf18f282fa0205596 (patch)
treee796066289a955ffa87863c8b6160f6cd83b5607 /app/controllers/application_controller.rb
parent10f14136f570863c2898f429c936de6c0114206a (diff)
downloadgitlab-ce-ef05423f47fdd970498d880cf18f282fa0205596.tar.gz
Finish select2-ajax for users. Added Select2Helper for tests
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index bb1afc80771..32b1246601d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -152,9 +152,8 @@ class ApplicationController < ActionController::Base
def add_gon_variables
gon.default_issues_tracker = Project.issues_tracker.default_value
- if current_user
- gon.api_token = current_user.private_token
- gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
- end
+ 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
end
end