Permalink
Browse files

Extract finding the template in AC to it's own method

  • Loading branch information...
1 parent e0f1a7d commit dd34691b8d04a41e7d2b34df96bfe849057dd093 Yehuda Katz + Carl Lerche committed Sep 2, 2009
Showing with 5 additions and 3 deletions.
  1. +5 −3 actionpack/lib/abstract_controller/rendering_controller.rb
@@ -112,11 +112,13 @@ def _determine_template(options)
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

0 comments on commit dd34691

Please sign in to comment.