aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/view_paths.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-08 23:13:24 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-08 23:25:16 +0100
commit8f082ff4217175f52234f2223658619a9c923afc (patch)
tree10b106df434109c5b5a117a06239a86be8266053 /actionpack/lib/abstract_controller/view_paths.rb
parent01f0e47663bbbc593af0c36d4cf49124b200e3d8 (diff)
downloadrails-8f082ff4217175f52234f2223658619a9c923afc.tar.gz
rails-8f082ff4217175f52234f2223658619a9c923afc.tar.bz2
rails-8f082ff4217175f52234f2223658619a9c923afc.zip
Clean LookupContext API.
Diffstat (limited to 'actionpack/lib/abstract_controller/view_paths.rb')
-rw-r--r--actionpack/lib/abstract_controller/view_paths.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/abstract_controller/view_paths.rb b/actionpack/lib/abstract_controller/view_paths.rb
index ec8f31cdfe..6513c0778e 100644
--- a/actionpack/lib/abstract_controller/view_paths.rb
+++ b/actionpack/lib/abstract_controller/view_paths.rb
@@ -7,8 +7,7 @@ module AbstractController
self._view_paths = ActionView::PathSet.new
end
- delegate :find_template, :template_exists?,
- :view_paths, :formats, :formats=, :to => :lookup_context
+ delegate :template_exists?, :view_paths, :formats, :formats=, :to => :lookup_context
# LookupContext is the object responsible to hold all information required to lookup
# templates, i.e. view paths and details. Check ActionView::LookupContext for more
@@ -29,6 +28,10 @@ module AbstractController
lookup_context.view_paths.unshift(*path)
end
+ def template_exists?(*args)
+ lookup_context.exists?(*args)
+ end
+
module ClassMethods
# Append a path to the list of view paths for this controller.
#