Move error page js into script tag #8723

Merged
merged 1 commit into from Jan 4, 2013

Projects

None yet

6 participants

@goshakkk
Contributor
goshakkk commented Jan 3, 2013

No description provided.

@vijaydev
Member
vijaydev commented Jan 3, 2013

👍

@carlosantoniodasilva carlosantoniodasilva and 1 other commented on an outdated diff Jan 3, 2013
...tion_dispatch/middleware/templates/rescues/layout.erb
@@ -114,6 +114,28 @@
a:visited { color: #666; }
a:hover { color: #C52F24; }
</style>
+
+ <script>
+ toggle = function(id) {
+ s = document.getElementById(id).style;
@carlosantoniodasilva
carlosantoniodasilva Jan 3, 2013 Member

Can you use var at least here? s doesn't need to be global.

@goshakkk
goshakkk Jan 3, 2013 Contributor

Sorry, fixed.

@acapilleri acapilleri commented on the diff Jan 3, 2013
...tion_dispatch/middleware/templates/rescues/layout.erb
@@ -114,6 +114,28 @@
a:visited { color: #666; }
a:hover { color: #C52F24; }
</style>
+
+ <script>
@acapilleri
acapilleri Jan 3, 2013 Contributor

add type="text/javascript", it is HTML4/XHTML1 require

@goshakkk
goshakkk Jan 3, 2013 Contributor

I think <!DOCTYPE html> clearly states it is HTML5 document, and omitting type in it is allowed. (Look also at <style> tag—no type as well.)

@steveklabnik
steveklabnik Jan 3, 2013 Member

Rails is HTML5.

@acapilleri
acapilleri Jan 3, 2013 Contributor

and HTML5 is Rails... 👍 anywa you're right, it has no sense for an error page

@guilleiguaran
Member

Let's do this!

@guilleiguaran guilleiguaran merged commit 7019858 into rails:master Jan 4, 2013
@goshakkk
Contributor
goshakkk commented Jan 4, 2013

Thanks for merging :)

@goshakkk goshakkk deleted the goshakkk:refactor-error-page branch Jan 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment