From 16a48a95e3cb0044587df7b0e83b017a94506739 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Fri, 9 Oct 2009 00:55:00 -1000 Subject: Fix issue with standalone ActionView --- actionpack/lib/action_view/render/partials.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/render') diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 4f60566a09..2eb88ae3e5 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -296,7 +296,10 @@ module ActionView end def _find_template(path) - prefix = @view.controller.controller_path unless path.include?(?/) + if controller = @view.controller + prefix = controller.controller_path unless path.include?(?/) + end + @view.find(path, {:formats => @view.formats}, prefix, true) end -- cgit v1.2.3