Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow subscribers to ajax:before to modify values in the form before …

…submit
  • Loading branch information...
commit dfa70fa49c79ffe945ff820c0c4c571ac02f7850 1 parent cc79186
@brianmario authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/rails.js
View
2  src/rails.js
@@ -23,7 +23,6 @@ jQuery(function ($) {
*/
callRemote: function () {
var el = this,
- data = el.is('form') ? el.serializeArray() : [],
method = el.attr('method') || el.attr('data-method') || 'GET',
url = el.attr('action') || el.attr('href'),
dataType = el.attr('data-type') || 'script';
@@ -32,6 +31,7 @@ jQuery(function ($) {
throw "No URL specified for remote call (action or href must be present).";
} else {
if (el.triggerAndReturn('ajax:before')) {
+ var data = el.is('form') ? el.serializeArray() : [];
$.ajax({
url: url,
data: data,
Please sign in to comment.
Something went wrong with that request. Please try again.