Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Where, instead of my inefficient approach, I execute XHR JavaScript responses. Behaves just like JangoSteve said it should for 400 or 424 HTTP response status codes.

Binds the event on $(document) so that dynamically created forms will be affected, too.

$(document).ready(function() {
$(document).on('ajax:error', 'form[data-remote="true"]', function(evt, xhr, status) {
eval(xhr.responseText);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.