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

上级 e0f1a7dc
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册