From 420c4b3d8878156d04f45e47050ddc62ae00c68c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 13 Apr 2008 17:33:27 -0500 Subject: Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger] --- actionpack/lib/action_controller/rescue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/rescue.rb') diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index b91115a93c..f5ad04532b 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -153,7 +153,7 @@ module ActionController #:nodoc: # If the file doesn't exist, the body of the response will be left empty. def render_optional_error_file(status_code) status = interpret_status(status_code) - path = "#{RAILS_ROOT}/public/#{status[0,3]}.html" + path = "#{Rails.public_path}/#{status[0,3]}.html" if File.exist?(path) render :file => path, :status => status else -- cgit v1.2.3