Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Customize 404 and internal error pages

  • Loading branch information...
commit 34518006cf179f966db30bfbb2e2cf8ef7152884 1 parent f8960dc
@mistydemeo authored
Showing with 38 additions and 0 deletions.
  1. +10 −0 app.rb
  2. +14 −0 views/404.erb
  3. +14 −0 views/internal_error.erb
View
10 app.rb
@@ -81,3 +81,13 @@
submission_confirmation
end
+
+not_found do
+ status 404
+ erb :'404'
+end
+
+error do
+ status 500
+ erb :internal_error
+end
View
14 views/404.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Lost: your way</title>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+</head>
+<body>
+ <pre>
+Looks like you lost your way!
+
+Why not search for something <a href="http://preeventualist.heroku.com/lost">here</a>?
+ </pre>
+</body>
+</html>
View
14 views/internal_error.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Catastrophe!!</title>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+</head>
+<body>
+ <pre>
+Oh no!! A terrible thing happened!
+
+Try heading back to <a href="http://preeventualist.heroku.com/lost">the homepage</a>.
+ </pre>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.