diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-08 23:13:24 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-08 23:25:16 +0100 |
commit | 8f082ff4217175f52234f2223658619a9c923afc (patch) | |
tree | 10b106df434109c5b5a117a06239a86be8266053 /actionpack/lib/abstract_controller | |
parent | 01f0e47663bbbc593af0c36d4cf49124b200e3d8 (diff) | |
download | rails-8f082ff4217175f52234f2223658619a9c923afc.tar.gz rails-8f082ff4217175f52234f2223658619a9c923afc.tar.bz2 rails-8f082ff4217175f52234f2223658619a9c923afc.zip |
Clean LookupContext API.
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/view_paths.rb | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 77c554fa3f..5048754e33 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -97,7 +97,7 @@ module AbstractController end if (options.keys & [:partial, :file, :template]).empty? - options[:_prefix] ||= _prefix + options[:prefix] ||= _prefix end options[:template] ||= (options[:action] || action_name).to_s 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. # |