Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/ssinghi/jquery-ujs into ssi…

…nghi-master
  • Loading branch information...
commit 86172458d936943c0edd790f988cf875d5f75c1c 2 parents dd9384f + ba5808e
@JangoSteve JangoSteve authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/rails.js
View
10 src/rails.js
@@ -52,7 +52,7 @@
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]',
// Select elements bound by jquery-ujs
- selectChangeSelector: 'select[data-remote]',
+ selectChangeSelector: 'select[data-remote], input[type="checkbox"][data-remote]',
// Form elements bound by jquery-ujs
formSubmitSelector: 'form',
@@ -114,15 +114,15 @@
data.push(button);
element.data('ujs:submit-button', null);
}
- } else if (element.is('select')) {
+ } else if (element.is('select') || element.is("input[type='checkbox']")) {
method = element.data('method');
url = element.data('url');
data = element.serialize();
- if (element.data('params')) data = data + "&" + element.data('params');
+ if (element.data('params')) data = data + "&" + element.data('params');
} else {
method = element.data('method');
url = element.attr('href');
- data = element.data('params') || null;
+ data = element.data('params') || null;
}
options = {
@@ -277,7 +277,7 @@
rails.handleRemote(link);
return false;
- });
+ });
$(rails.formSubmitSelector).live('submit.rails', function(e) {
var form = $(this),
Please sign in to comment.
Something went wrong with that request. Please try again.