Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The view context always responds to controller, check if controller a…

…vailable instead
  • Loading branch information...
commit a916c2e3d316c8338fa1d9d15f449403bddddf11 1 parent fe26405
@josh josh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/partials.rb
View
2  actionpack/lib/action_view/partials.rb
@@ -190,7 +190,7 @@ def render_partial_collection(options = {}) #:nodoc:
def _pick_partial_template(partial_path) #:nodoc:
if partial_path.include?('/')
path = File.join(File.dirname(partial_path), "_#{File.basename(partial_path)}")
- elsif respond_to?(:controller)
+ elsif controller
path = "#{controller.class.controller_path}/_#{partial_path}"
else
path = "_#{partial_path}"
Please sign in to comment.
Something went wrong with that request. Please try again.