aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-02 15:53:38 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-03 11:18:56 -0700
commitdd34691b8d04a41e7d2b34df96bfe849057dd093 (patch)
tree769ee6dffe5da6d8cd1cc7bfc4aa3e1af27a7487
parente0f1a7dc191ffebc9f6cadb6232e567fee8aa491 (diff)
downloadrails-dd34691b8d04a41e7d2b34df96bfe849057dd093.tar.gz
rails-dd34691b8d04a41e7d2b34df96bfe849057dd093.tar.bz2
rails-dd34691b8d04a41e7d2b34df96bfe849057dd093.zip
Extract finding the template in AC to it's own method
-rw-r--r--actionpack/lib/abstract_controller/rendering_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/rendering_controller.rb b/actionpack/lib/abstract_controller/rendering_controller.rb
index feca1bc4b7..c23b1a9aa7 100644
--- a/actionpack/lib/abstract_controller/rendering_controller.rb
+++ b/actionpack/lib/abstract_controller/rendering_controller.rb
@@ -112,11 +112,13 @@ 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 with_template_cache(name)
yield