Skip to content

Instantly share code, notes, and snippets.

View sabind's full-sized avatar
👨‍💻
Working on COVID-19 Projects

Dan Sabin sabind

👨‍💻
Working on COVID-19 Projects
  • Owner - FreeThinking IT + REMOVE LLC
  • Los Angeles, CA
View GitHub Profile

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@nowk
nowk / application.js
Created March 18, 2012 22:24
Formtastic errors w/ ajax + knockout.js and responds_to :json
$.ajax({
error: function(jqXHR, textStatus, errorThrown) {
// reset
$('.formtastic li').removeClass("error");
$('.formtastic li .inline-errors').remove();
// set the errors
// TODO turn into dynamic
// TODO include errors for :base and #semantic_errors
var errors = ko.mapping.toJS(ko.mapping.fromJSON(jqXHR.responseText));