diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-22 10:27:32 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-22 10:27:32 -0500 |
commit | bc5896e708bf8070835bebe61de03b701fa5e6f7 (patch) | |
tree | e244324bec641c94eca09b25bb9decba0f4699c0 /actionpack/lib/action_view/template.rb | |
parent | 8a87d8a6c2c6dfb423bcaf61c750010d80993b16 (diff) | |
download | rails-bc5896e708bf8070835bebe61de03b701fa5e6f7.tar.gz rails-bc5896e708bf8070835bebe61de03b701fa5e6f7.tar.bz2 rails-bc5896e708bf8070835bebe61de03b701fa5e6f7.zip |
Memoize ActionView::Base pick_template and find_partial_path for rendering duration
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 1f528dd900..3fcd9a2d01 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -75,7 +75,7 @@ module ActionView #:nodoc: load_paths = Array(load_paths) + [nil] load_paths.each do |load_path| file = [load_path, path].compact.join('/') - return load_path, file if File.exist?(file) + return load_path, file if File.exist?(file) && File.file?(file) end raise MissingTemplate.new(load_paths, path) end |