aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-11-26 20:54:47 -0600
committerJoshua Peek <josh@joshpeek.com>2008-11-26 20:54:47 -0600
commit4d910b033379727e5e7355590c50c72fc75e56db (patch)
treeada3e45bf32d37d8f17f6ea944c8400912da26a8 /actionpack/lib/action_view/base.rb
parent9d2002a12a473f5b35c52db82518f4631776414f (diff)
downloadrails-4d910b033379727e5e7355590c50c72fc75e56db.tar.gz
rails-4d910b033379727e5e7355590c50c72fc75e56db.tar.bz2
rails-4d910b033379727e5e7355590c50c72fc75e56db.zip
Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache.
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 7697848713..da1f283deb 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -322,9 +322,7 @@ module ActionView #:nodoc:
end
# OPTIMIZE: Checks to lookup template in view path
- if template = self.view_paths["#{template_file_name}.#{template_format}"]
- template
- elsif template = self.view_paths[template_file_name]
+ if template = self.view_paths.find_template(template_file_name, template_format)
template
elsif (first_render = @_render_stack.first) && first_render.respond_to?(:format_and_extension) &&
(template = self.view_paths["#{template_file_name}.#{first_render.format_and_extension}"])