Sha256: 9d3c7d6e54121de45c173da11ec14b754fb9639d5641997db9f074ced4b854db
Contents?: true
Size: 853 Bytes
Versions: 13
Compression:
Stored size: 853 Bytes
Contents
if(!window.Jelly) Jelly = new Object(); (Jelly.defineAjaxWithJellyFunctions = function($) { $.ajaxWithJelly = function(params) { $.ajax($.ajaxWithJelly.params(params)); }; if ($.fn.ajaxForm) { $.fn.ajaxFormWithJelly = function(params) { this.ajaxForm($.ajaxWithJelly.params(params)); }; } $.ajaxWithJelly.params = function(otherParams) { otherParams = otherParams || {}; if (otherParams.type && otherParams.type != "GET") { otherParams['data'] = $.extend(otherParams['data'], { authenticity_token: window._token }); } var observers = otherParams.observers || Jelly.observers; return $.extend({ dataType: 'json', cache: false, success : function(callbacks) { Jelly.Observers.notify.call(observers, callbacks); } }, otherParams); }; })(jQuery);
Version data entries
13 entries across 13 versions & 3 rubygems