Module: ActionView::ViewPaths

Extended by:
ActiveSupport::Concern
Included in:
Rendering
Defined in:
lib/action_view/view_paths.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#_prefixesObject

The prefixes used in render “foo” shortcuts.


51
52
53
# File 'lib/action_view/view_paths.rb', line 51

def _prefixes # :nodoc:
  self.class._prefixes
end

#append_view_path(path) ⇒ Object


67
68
69
# File 'lib/action_view/view_paths.rb', line 67

def append_view_path(path)
  lookup_context.view_paths.push(*path)
end

#details_for_lookupObject


63
64
65
# File 'lib/action_view/view_paths.rb', line 63

def details_for_lookup
  { }
end

#lookup_contextObject

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.


58
59
60
61
# File 'lib/action_view/view_paths.rb', line 58

def lookup_context
  @_lookup_context ||=
    ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes)
end

#prepend_view_path(path) ⇒ Object


71
72
73
# File 'lib/action_view/view_paths.rb', line 71

def prepend_view_path(path)
  lookup_context.view_paths.unshift(*path)
end