Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…submit
  • Loading branch information...
commit dfa70fa49c79ffe945ff820c0c4c571ac02f7850 1 parent cc79186
Brian Lopez authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/rails.js
2  src/rails.js
@@ -23,7 +23,6 @@ jQuery(function ($) {
23 23 */
24 24 callRemote: function () {
25 25 var el = this,
26   - data = el.is('form') ? el.serializeArray() : [],
27 26 method = el.attr('method') || el.attr('data-method') || 'GET',
28 27 url = el.attr('action') || el.attr('href'),
29 28 dataType = el.attr('data-type') || 'script';
@@ -32,6 +31,7 @@ jQuery(function ($) {
32 31 throw "No URL specified for remote call (action or href must be present).";
33 32 } else {
34 33 if (el.triggerAndReturn('ajax:before')) {
  34 + var data = el.is('form') ? el.serializeArray() : [];
35 35 $.ajax({
36 36 url: url,
37 37 data: data,

0 comments on commit dfa70fa

Please sign in to comment.
Something went wrong with that request. Please try again.