aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/render')
-rw-r--r--actionpack/lib/action_view/render/partials.rb5
1 files changed, 4 insertions, 1 deletions
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