diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index b96f04a50b..fd66b0cbf6 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -25,10 +25,9 @@ module ActionController #:nodoc: # Exception handler called when the performance of an action raises an exception. def rescue_action(exception) log_error(exception) if logger - erase_results if perfomed? + erase_results if performed? if consider_all_requests_local || local_request? - @template.send(:assign_variables_from_controller) rescue_action_locally(exception) else rescue_action_in_public(exception) @@ -68,6 +67,8 @@ module ActionController #:nodoc: def rescue_action_locally(exception) @template.instance_variable_set("@exception", exception) @template.instance_variable_set("@rescues_path", File.dirname(__FILE__) + "/templates/rescues/") + @template.send(:assign_variables_from_controller) + @template.instance_variable_set("@contents", @template.render_file(template_path_for_local_rescue(exception), false)) @headers["Content-Type"] = "text/html" |