Skip to content

Commit

Permalink
Return back static 500 page
Browse files Browse the repository at this point in the history
  • Loading branch information
sfate committed Jan 11, 2017
1 parent 95b5bed commit 4930a91
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 20 deletions.
1 change: 0 additions & 1 deletion app/controllers/concerns/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module Errors
extend ActiveSupport::Concern

included do
rescue_from Exception, with: -> { render_error(code: 500) }
rescue_from ActiveRecord::RecordInvalid, with: -> { render_error(code: 422) }
rescue_from ActiveRecord::RecordNotFound, with: -> { render_error(code: 404) }
rescue_from ActionController::UnknownController, with: -> { render_error(code: 404) }
Expand Down
19 changes: 0 additions & 19 deletions app/views/errors/500.html.slim

This file was deleted.

64 changes: 64 additions & 0 deletions public/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
@import url(//fonts.googleapis.com/css?family=Forum);

body { background-color: #fff; color: #333; text-align: center; font-family: arial, sans-serif; font-size: 14px; }
a{
color: #000;
}

.logo{
padding: 10px 0 20px;
}
.logo img{
width: 360px;
}

.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
}
h1 { font-family: 'Forum'; font-size: 33px; line-height: 0.9em; text-transform: uppercase; color: #000;}
</style>
</head>

<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<div class="logo">
<img src="https://www.fameandpartners.com/assets/logo/new-logo.svg"/>
</div>
<h1>So sorry to interrupt your shopping experience.</h1>
<p>In the meantime, here is a $20 voucher to make up for your time - just use this code <strong>@checkout: OOPS20</strong></p>
<p>
We should be back up in a few minutes but if you would like some further assistance, feel free to email or call us:
</p>
<p>
team@fameandpartners.com
</p>
<div class="engineers">
Our site engineers are currently making some upgrades to make it even better.
</div>
<p>
<a href="https://www.fameandpartners.com/?cf=404">Go to the homepage</a>
</p>
</div>
<div style="display:none;">
::CLOUDFLARE_ERROR_500S_BOX::
</div>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-41247818-1', 'auto');
ga('send', 'pageview');
ga('send', 'event', '500', 'server error');
</script>
</body>
</html>

0 comments on commit 4930a91

Please sign in to comment.