Class: Lotus::View::Rendering::PartialFinder Private
- Inherits:
-
TemplateFinder
- Object
- TemplatesFinder
- TemplateFinder
- Lotus::View::Rendering::PartialFinder
- Defined in:
- lib/lotus/view/rendering/partial_finder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Find a partial for the current view context. It’s used when a template wants to render a partial.
Constant Summary collapse
- PREFIX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Template file name prefix. By convention a partial file name starts with this prefix.
'_'.freeze
Constants inherited from TemplatesFinder
TemplatesFinder::ENGINES, TemplatesFinder::FORMAT, TemplatesFinder::RECURSIVE
Instance Method Summary collapse
-
#find ⇒ Lotus::View::Template
private
Find a template for a partial.
Methods inherited from TemplateFinder
Methods inherited from TemplatesFinder
Constructor Details
This class inherits a constructor from Lotus::View::Rendering::TemplateFinder
Instance Method Details
#find ⇒ Lotus::View::Template
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Find a template for a partial. Initially it will look for the partial template under the directory of the parent directory view template, if not found it will search recursivly from the view root.
36 37 38 39 40 41 42 |
# File 'lib/lotus/view/rendering/partial_finder.rb', line 36 def find if path = partial_template_under_view_path View::Template.new(path, @view.configuration.default_encoding) else super end end |