From 81c7a5d48d972c9e3973b4c018fafae1dfd9c0de Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 6 Feb 2009 12:13:23 +0100 Subject: Remove the ERb in the 500 as it looks dumb when served by the web server directly. Also, to instructions will often be wrong (the error might well be in the web server log) --- railties/html/500.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/railties/html/500.html b/railties/html/500.html index 74142cb04a..ec3bbf02c4 100644 --- a/railties/html/500.html +++ b/railties/html/500.html @@ -25,9 +25,6 @@

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

-

(If you're the administrator of this website, then please read - the log file "<%= "<%s>" % "%=h RAILS_ENV %" %>.log" - to find out what went wrong.)

-- cgit v1.2.3 From 10b6073968eb43a3e20efd352d97d08720beeb12 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 6 Feb 2009 15:22:04 +0100 Subject: This is no longer relevant when the 500.html is comletely static --- railties/test/error_page_test.rb | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 railties/test/error_page_test.rb diff --git a/railties/test/error_page_test.rb b/railties/test/error_page_test.rb deleted file mode 100644 index f819e468e8..0000000000 --- a/railties/test/error_page_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'abstract_unit' -require 'action_controller' -require 'action_controller/test_case' - -RAILS_ENV = "test" -CURRENT_DIR = File.expand_path(File.dirname(__FILE__)) -HTML_DIR = File.expand_path(File.join(CURRENT_DIR, "..", "html")) - -module Rails - def self.public_path - CURRENT_DIR - end -end - -class ErrorPageController < ActionController::Base - def crash - raise StandardError, "crash!" - end -end - -ActionController::Routing::Routes.draw do |map| - map.connect ':controller/:action/:id' -end - -class ErrorPageControllerTest < ActionController::TestCase - def setup - ActionController::Base.consider_all_requests_local = false - rescue_action_in_public! - end - - def test_500_error_page_instructs_system_administrator_to_check_log_file - template = ERB.new(File.read(File.join(HTML_DIR, "500.html"))) - File.open(File.join(CURRENT_DIR, "500.html"), "w") do |f| - f.write(template.result) - end - get :crash - expected_log_file = "#{RAILS_ENV}.log" - assert_not_nil @response.body.index(expected_log_file), @response.body - end -end -- cgit v1.2.3