Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Jquery page exception error for rails
<% if Rails.env.development? %>
@onLoadFailed = (event, data) ->
text = data.xhr.responseText
newHtml = text.split(/<\/?html[^>]*>/g)[1]
$("html").html newHtml
$(document).on "pageloadfailed", onLoadFailed
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment