From 65ceccb0ba13dc845e6c73ada09b354583c1557a Mon Sep 17 00:00:00 2001 From: Nick Sutterer Date: Tue, 3 May 2011 23:41:38 +0200 Subject: controller's prefixes are now added to LookupContext. --- actionpack/lib/abstract_controller/view_paths.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/abstract_controller') diff --git a/actionpack/lib/abstract_controller/view_paths.rb b/actionpack/lib/abstract_controller/view_paths.rb index cea0f5ad1e..4fdca2cc5c 100644 --- a/actionpack/lib/abstract_controller/view_paths.rb +++ b/actionpack/lib/abstract_controller/view_paths.rb @@ -15,7 +15,10 @@ module AbstractController # templates, i.e. view paths and details. Check ActionView::LookupContext for more # information. def lookup_context - @lookup_context ||= ActionView::LookupContext.new(self.class._view_paths, details_for_lookup) + @lookup_context ||= + ActionView::LookupContext.new(self.class._view_paths, details_for_lookup).tap do |ctx| + ctx.prefixes = _prefixes + end end def details_for_lookup @@ -67,4 +70,4 @@ module AbstractController end end end -end \ No newline at end of file +end -- cgit v1.2.3 From eb327c1bab918c7d9ab723550f767529771d2e19 Mon Sep 17 00:00:00 2001 From: Nick Sutterer Date: Wed, 4 May 2011 00:12:11 +0200 Subject: no @controller dependency in Renderers. --- actionpack/lib/abstract_controller/rendering.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/abstract_controller') diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 7f1a790ecc..8789168ca7 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -104,7 +104,7 @@ module AbstractController # Returns an object that is able to render templates. def view_renderer - @view_renderer ||= ActionView::Renderer.new(lookup_context, self) + @view_renderer ||= ActionView::Renderer.new(lookup_context) end # Normalize arguments, options and then delegates render_to_body and -- cgit v1.2.3