public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/thewoolleyman/rails.git
The view context always responds to controller, check if controller 
available instead
josh (author)
Mon Aug 25 13:34:55 -0700 2008
commit  a916c2e3d316c8338fa1d9d15f449403bddddf11
tree    237db3e5a46eb84da6a12bf20411b7ab729c1bff
parent  fe2640549bfc57cd862742494198781fda07ce36
...
190
191
192
193
 
194
195
196
...
190
191
192
 
193
194
195
196
0
@@ -190,7 +190,7 @@ module ActionView
0
       def _pick_partial_template(partial_path) #:nodoc:
0
         if partial_path.include?('/')
0
           path = File.join(File.dirname(partial_path), "_#{File.basename(partial_path)}")
0
- elsif respond_to?(:controller)
0
+ elsif controller
0
           path = "#{controller.class.controller_path}/_#{partial_path}"
0
         else
0
           path = "_#{partial_path}"

Comments

    No one has commented yet.