Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More Coffeescript goodness

  • Loading branch information...
commit 0b2243a386ff0ffd546c75902cfab5a7da522b9e 1 parent e066595
@bcardarella bcardarella authored
View
4 coffeescript/rails.validations.formtastic.coffee
@@ -15,11 +15,11 @@ ClientSideValidations.formBuilders['Formtastic::FormBuilder'] =
wrapper.addClass('error')
wrapper.append(errorElement)
else
- element.parent().find('p.' + settings.inline_error_class).text(message)
+ element.parent().find("p.#{settings.inline_error_class}").text(message)
remove: (element, settings) ->
wrapper = element.closest('li.error')
- errorElement = wrapper.find('p.' + settings.inline_error_class)
+ errorElement = wrapper.find("p.#{settings.inline_error_class}")
wrapper.removeClass('error')
errorElement.remove()
View
4 vendor/assets/javascripts/rails.validations.formtastic.js
@@ -22,13 +22,13 @@
wrapper.addClass('error');
return wrapper.append(errorElement);
} else {
- return element.parent().find('p.' + settings.inline_error_class).text(message);
+ return element.parent().find("p." + settings.inline_error_class).text(message);
}
},
remove: function(element, settings) {
var errorElement, wrapper;
wrapper = element.closest('li.error');
- errorElement = wrapper.find('p.' + settings.inline_error_class);
+ errorElement = wrapper.find("p." + settings.inline_error_class);
wrapper.removeClass('error');
return errorElement.remove();
}
Please sign in to comment.
Something went wrong with that request. Please try again.