Module: ActionView::ViewPaths
- Extended by:
- ActiveSupport::Concern
- Included in:
- AbstractController::Rendering, Rendering
- Defined in:
- actionview/lib/action_view/view_paths.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#_prefixes ⇒ Object
The prefixes used in render “foo” shortcuts.
- #append_view_path(path) ⇒ Object
- #details_for_lookup ⇒ Object
-
#lookup_context ⇒ Object
LookupContext is the object responsible to hold all information required to lookup templates, i.e.
- #prepend_view_path(path) ⇒ Object
Methods included from ActiveSupport::Concern
append_features, extended, included
Instance Method Details
#_prefixes ⇒ Object
The prefixes used in render “foo” shortcuts.
33 34 35 36 37 38 |
# File 'actionview/lib/action_view/view_paths.rb', line 33 def _prefixes @_prefixes ||= begin parent_prefixes = self.class.parent_prefixes parent_prefixes.dup.unshift(controller_path) end end |
#append_view_path(path) ⇒ Object
52 53 54 |
# File 'actionview/lib/action_view/view_paths.rb', line 52 def append_view_path(path) lookup_context.view_paths.push(*path) end |
#details_for_lookup ⇒ Object
48 49 50 |
# File 'actionview/lib/action_view/view_paths.rb', line 48 def details_for_lookup { } end |
#lookup_context ⇒ Object
LookupContext is the object responsible to hold all information required to lookup templates, i.e. view paths and details. Check ActionView::LookupContext for more information.
43 44 45 46 |
# File 'actionview/lib/action_view/view_paths.rb', line 43 def lookup_context @_lookup_context ||= ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes) end |
#prepend_view_path(path) ⇒ Object
56 57 58 |
# File 'actionview/lib/action_view/view_paths.rb', line 56 def prepend_view_path(path) lookup_context.view_paths.unshift(*path) end |