1 $(document).ready(function () {
2 var application_data = $("head").data();
4 if (application_data.oauthToken) {
5 $.ajaxPrefilter(function (options) {
7 options.headers = options.headers || {};
8 options.headers.Authorization = "Bearer " + application_data.oauthToken;