Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix plugin routing - temporary workaround for #893

This allow plugins to be routable in production mode, rather than
getting 404s. It is not a permanent solution, however, because 404
and 500 handling is poor.
  • Loading branch information...
commit 0367ea6ac106f0d0bb63bd243e8cc26b99f3b5c4 1 parent 1ecd7a6
@mikldt mikldt authored
Showing with 34 additions and 5 deletions.
  1. +3 −4 config/routes.rb
  2. +30 −0 public/404.html
  3. +1 −1  public/500.html
View
7 config/routes.rb
@@ -119,8 +119,7 @@ def matches?(request)
match 'content/' => 'feeds#index'
match 'browse/' => 'feeds#index'
- unless Rails.application.config.consider_all_requests_local
- match '*not_found', :to => 'errors#error_404'
- end
-
+ # Note: 404 errors are currently not handled by routes.
+ # Rails' built-in handling will serve the error content from /public,
+ # when we're not in development mode.
end
View
30 public/404.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>500 Error - Concerto Panel</title>
@mfrederickson Collaborator

404?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ <style type="text/css">
+ body, html { background: #fff !important; }
+ </style>
+ <link href="/assets/application.css" media="screen" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <br />
+ <br />
+ <div class="row-fluid">
+ <div class="span4 center">
+ <img alt="404" src="/assets/miniscreen/404_screen.png" style="max-width: 90%;" width="298">
+ <h1 style="font-size: 6em; color: #000; letter-spacing: -0.025em;">404</h1>
+ <br />
+ </div>
+ <div class="span8">
+ <h1 style="font-size: 4em; letter-spacing: -0.025em;">I'm afraid we're not in Kansas anymore.</h1>
+ <br />
+ <h2>The Concerto content you were looking for could not be found.<br />Sometimes a strategic retreat is the best option.</h2>
+ <br />
+ <a href="/" class="btn btn-large">Abort!</a>
+ </div>
+ </div>
+</body>
+</html>
View
2  public/500.html
@@ -14,7 +14,7 @@
<br />
<div class="row-fluid">
<div class="span4 center">
- <img alt="404" src="/assets/miniscreen/500_screen.png" style="max-width: 90%;" width="298">
+ <img alt="500" src="/assets/miniscreen/500_screen.png" style="max-width: 90%;" width="298">
<h1 style="font-size: 6em; color: red; letter-spacing: -0.025em;">500</h1>
<br />
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.