From 4c21ea1859c7d4ad418c0d71c73f71fe6a1df4f0 Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 29 Jun 2014 07:10:13 +0200 Subject: [PATCH] add way to raise error; funny 500 status message --- app/controllers/statics_controller.rb | 4 ++++ config/routes.rb | 2 ++ public/500.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/statics_controller.rb b/app/controllers/statics_controller.rb index f2891f3..e0a825b 100644 --- a/app/controllers/statics_controller.rb +++ b/app/controllers/statics_controller.rb @@ -14,4 +14,8 @@ class StaticsController < ApplicationController def donate end + def raise_500 + raise "Someone called /raise_500! OMG!" + end + end diff --git a/config/routes.rb b/config/routes.rb index a1a50af..3868199 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -49,6 +49,8 @@ Redstoner::Application.routes.draw do get 'logout' => 'sessions#destroy' get 'signup' => 'users#new' + post 'raise_500' => 'statics#raise_500' + # post 'paypal' => 'paypal#create' root to: 'statics#index' diff --git a/public/500.html b/public/500.html index f034779..638b33c 100644 --- a/public/500.html +++ b/public/500.html @@ -1 +1 @@ -500

500 - Server error

500 machine \ No newline at end of file +500

500 - Sheep malfunction

500 machine \ No newline at end of file