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.



33
34
35
# File 'lib/action_view/view_paths.rb', line 33

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

#append_view_path(path) ⇒ Object



49
50
51
# File 'lib/action_view/view_paths.rb', line 49

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

#details_for_lookupObject



45
46
47
# File 'lib/action_view/view_paths.rb', line 45

def details_for_lookup
  { }
end

#lookup_contextObject

LookupContext is the object responsible for holding all information required for looking up templates, i.e. view paths and details. Check ActionView::LookupContext for more information.



40
41
42
43
# File 'lib/action_view/view_paths.rb', line 40

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

#prepend_view_path(path) ⇒ Object



53
54
55
# File 'lib/action_view/view_paths.rb', line 53

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