aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/rescue.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-04-13 17:33:27 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-04-13 17:33:27 -0500
commit420c4b3d8878156d04f45e47050ddc62ae00c68c (patch)
treee56d27d2078a7553b161a1088594e147e25ed2da /actionpack/lib/action_controller/rescue.rb
parentbe7fd8168aa4776dccfe2e670cb9451204449dd4 (diff)
downloadrails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.gz
rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.bz2
rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.zip
Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger]
Diffstat (limited to 'actionpack/lib/action_controller/rescue.rb')
-rw-r--r--actionpack/lib/action_controller/rescue.rb2
1 files changed, 1 insertions, 1 deletions
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