diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-09-08 15:38:51 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-09-08 15:38:51 -0300 |
commit | 670281c6b2e9b9e8c51a140f2a5f66b251f1b84b (patch) | |
tree | ab141872d72e010c8a0fe371d22a00914c97e1eb /actionpack/lib/abstract_controller/rendering_controller.rb | |
parent | 39e4e76d15233bb1cb0b778d920f54efe86bb4f0 (diff) | |
parent | 1a0f822037c408a392ffa7b6e1ecbe5951ab48db (diff) | |
download | rails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.tar.gz rails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.tar.bz2 rails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.zip |
Merge commit 'rails/master'
Conflicts:
activerecord/lib/active_record/associations.rb
Diffstat (limited to 'actionpack/lib/abstract_controller/rendering_controller.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/rendering_controller.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/rendering_controller.rb b/actionpack/lib/abstract_controller/rendering_controller.rb index feca1bc4b7..bbf941aa32 100644 --- a/actionpack/lib/abstract_controller/rendering_controller.rb +++ b/actionpack/lib/abstract_controller/rendering_controller.rb @@ -112,12 +112,18 @@ module AbstractController name = (options[:_template_name] || action_name).to_s options[:_template] ||= with_template_cache(name) do - view_paths.find( - name, { :formats => formats }, options[:_prefix], options[:_partial] - ) + find_template(name, { :formats => formats }, options) end end - + + def find_template(name, details, options) + view_paths.find(name, details, options[:_prefix], options[:_partial]) + end + + def template_exists?(name, details, options) + view_paths.exists?(name, details, options[:_prefix], options[:_partial]) + end + def with_template_cache(name) yield end |