mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Extract finding the template in AC to it's own method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user