1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Yehuda Katz + Carl Lerche 2009-09-02 15:53:38 -07:00
parent e0f1a7dc19
commit dd34691b8d

View file

@ -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