From 73709f7ffacca74cea2111b42a1ef65a7f8ebc3b Mon Sep 17 00:00:00 2001 From: brainopia Date: Fri, 20 Jan 2012 20:13:29 +0400 Subject: Removed unused assigns from ActionView::Template::Error They existed since initial rails commit by DHH but lost use a long time ago --- actionpack/lib/action_view/template.rb | 5 ++--- actionpack/lib/action_view/template/error.rb | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 593eaa2abf..edb3d427d5 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -288,7 +288,7 @@ module ActionView logger.debug "Backtrace: #{e.backtrace.join("\n")}" end - raise ActionView::Template::Error.new(self, {}, e) + raise ActionView::Template::Error.new(self, e) end end @@ -297,13 +297,12 @@ module ActionView e.sub_template_of(self) raise e else - assigns = view.respond_to?(:assigns) ? view.assigns : {} template = self unless template.source template = refresh(view) template.encode! end - raise Template::Error.new(template, assigns, e) + raise Template::Error.new(template, e) end end diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb index 83df2604bb..d8258f7b11 100644 --- a/actionpack/lib/action_view/template/error.rb +++ b/actionpack/lib/action_view/template/error.rb @@ -55,9 +55,9 @@ module ActionView attr_reader :original_exception, :backtrace - def initialize(template, assigns, original_exception) + def initialize(template, original_exception) super(original_exception.message) - @template, @assigns, @original_exception = template, assigns.dup, original_exception + @template, @original_exception = template, original_exception @sub_templates = nil @backtrace = original_exception.backtrace end -- cgit v1.2.3