diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-27 14:17:47 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-27 14:17:47 +0000 |
commit | 9fad3251d3d11f32fad01c820b6d1d72e2329976 (patch) | |
tree | 4e8050ebaabd505ab5b5a894c08bc93fc45b0681 /actionpack/lib | |
parent | c22ebd909d9d4938616231fae96015f1da8f5620 (diff) | |
download | rails-9fad3251d3d11f32fad01c820b6d1d72e2329976.tar.gz rails-9fad3251d3d11f32fad01c820b6d1d72e2329976.tar.bz2 rails-9fad3251d3d11f32fad01c820b6d1d72e2329976.zip |
More fixes, but still broken
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 5 |
2 files changed, 6 insertions, 4 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" diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 290cc28b39..097e4f8b7f 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -286,7 +286,7 @@ module ActionView #:nodoc: def evaluate_assigns(local_assigns = {}) unless @assigns_added - @assigns.each { |key, value| instance_variable_set("@#{key}", value) } + assign_variables_from_controller @assigns_added = true end saved_locals = {} @@ -333,11 +333,12 @@ module ActionView #:nodoc: t_name += @@template_count.to_s end + @@loaded_templates[cache_name] = Time.now if file_name + t_def = "def #{t_name}#{t_arg}; #{t_code}; end" self.class.class_eval(t_def) rescue raise ActionViewError, "ERROR defining #{t_name}: #{t_def}" @@compiled_templates[cache_name] = t_name.intern - @@loaded_templates[cache_name] = Time.now if file_name logger.debug "Compiled template #{cache_name}\n ==> #{t_name}" if logger end |