From 31d3048706eee65673eeebe28d76064632420a97 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 9 Oct 2006 00:40:05 +0000 Subject: Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own (closes #6295) [mnaberez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/rescue.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 649b2aeb67..a9bd209f15 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [mnaberez] + * Fixed escaping of backslashes in JavaScriptHelper#escape_javascript #6302 [sven@c3d2.de] * Fixed that some 500 rescues would cause 500's themselves because the response had not yet been generated #6329 [cmselmer] diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index 34014bfd38..363eba2931 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -66,7 +66,7 @@ module ActionController #:nodoc: def rescue_action_locally(exception) add_variables_to_assigns @template.instance_variable_set("@exception", exception) - @template.instance_variable_set("@rescues_path", File.dirname(__FILE__) + "/templates/rescues/") + @template.instance_variable_set("@rescues_path", File.dirname(rescues_path("stub"))) @template.send(:assign_variables_from_controller) @template.instance_variable_set("@contents", @template.render_file(template_path_for_local_rescue(exception), false)) -- cgit v1.2.3