Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change var naming convention for consistency

  • Loading branch information...
commit bddff6a677edc54f00e48bde740b0b22d68deef6 1 parent 015061a
@JangoSteve JangoSteve authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/rails.js
View
7 src/rails.js
@@ -253,15 +253,16 @@
blankInputs: function(form, specifiedSelector, nonBlank) {
var inputs = $(), input, valueToCheck,
selector = specifiedSelector || 'input,textarea',
- $allInputs = form.find(selector);
- $allInputs.each(function() {
+ allInputs = form.find(selector);
+
+ allInputs.each(function() {
input = $(this);
valueToCheck = input.is(':checkbox,:radio') ? input.is(':checked') : input.val();
// If nonBlank and valueToCheck are both truthy, or nonBlank and valueToCheck are both falsey
if (!valueToCheck === !nonBlank) {
// Don't count unchecked required radio if other radio with same name is checked
- if (input.is(':radio') && $allInputs.filter('input:radio:checked[name="' + input.attr('name') + '"]').length) {
+ if (input.is(':radio') && allInputs.filter('input:radio:checked[name="' + input.attr('name') + '"]').length) {
return true; // Skip to next input
}
Please sign in to comment.
Something went wrong with that request. Please try again.