instance method
[]
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
[](path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_view/reloadable_template.rb, line 20
def [](path)
if found_template = @paths[path]
begin
found_template.reset_cache_if_stale!
rescue TemplateDeleted
unregister_template(found_template)
self[path]
end
else
load_all_templates_from_dir(templates_dir_from_path(path))
# don't ever hand out a template without running a stale check
(new_template = @paths[path]) && new_template.reset_cache_if_stale!
end
end
Defined in actionpack/lib/action_view/reloadable_template.rb line 20
· View on GitHub
· Improve this page
· Find usages on GitHub