PUT Solicitud de Ajax
Soy nuevo en hacer una solicitud de Ajax y he reunido las siguientes Pastie. La línea 107 es mi $ .PUT y arroja un error en firebug que $ .PUT no funciona. En cuanto a la solicitud ajax, sé que esto está mal, sin embargo, estoy bastante perdido en cuanto a lo que necesito hacer dentro de la función de éxito addCell. ¿Voy por el camino correcto sobre esto?
Editado
function _ajax_request(url, data, callback, type, method) {
return jQuery.ajax({
type: 'PUT',
url: "slot_days/show",
data: data,
success: function(data)
{
callback($.put('/slot_days/show', { '/slot_days/': 'slot_times' }, function(result)
{
});
)
}
});
}
jQuery.extend({
put: function(url, data, callback, type) {
return _ajax_request(url, data, callback, type, 'PUT');
}});