diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-08-25 15:34:55 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-25 15:37:19 -0500 |
commit | a916c2e3d316c8338fa1d9d15f449403bddddf11 (patch) | |
tree | 237db3e5a46eb84da6a12bf20411b7ab729c1bff | |
parent | fe2640549bfc57cd862742494198781fda07ce36 (diff) | |
download | rails-a916c2e3d316c8338fa1d9d15f449403bddddf11.tar.gz rails-a916c2e3d316c8338fa1d9d15f449403bddddf11.tar.bz2 rails-a916c2e3d316c8338fa1d9d15f449403bddddf11.zip |
The view context always responds to controller, check if controller available instead
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index 4d19d992df..443c49b870 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -190,7 +190,7 @@ module ActionView 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}" |