Created
April 27, 2012 22:46
-
-
Save ntreadway/2514032 to your computer and use it in GitHub Desktop.
Jquery page exception error for rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% 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