123456789_123456789_123456789_123456789_123456789_

Module: ActionView::ViewPaths

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
::AbstractController::Rendering, ::ActionController::Base, ::ActionMailer::Base, Layouts, LookupContext, Rendering, TestCase::TestController, Rails::ApplicationController, Rails::InfoController, Rails::MailersController, Rails::WelcomeController
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: actionview/lib/action_view/view_paths.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

DSL Calls

included

[ GitHub ]


7
8
9
10
11
# File 'actionview/lib/action_view/view_paths.rb', line 7

included do
  class_attribute :_view_paths
  self._view_paths = ActionView::PathSet.new
  self._view_paths.freeze
end

Instance Attribute Details

#formats (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 13

delegate :template_exists?, :view_paths, :formats, :formats=,
         :locale, :locale=, :to => :lookup_context

#locale (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 13

delegate :template_exists?, :view_paths, :formats, :formats=,
         :locale, :locale=, :to => :lookup_context

#view_paths (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 13

delegate :template_exists?, :view_paths, :formats, :formats=,
         :locale, :locale=, :to => :lookup_context

Instance Method Details

#append_view_path(path)

[ GitHub ]

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

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

#details_for_lookup

[ GitHub ]

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

def details_for_lookup
  { }
end

#lookup_context

LookupContext is the object responsible to hold all information required to lookup templates, i.e. view paths and details. Check LookupContext for more information.

[ GitHub ]

  
# File 'actionview/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)

[ GitHub ]

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

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

#template_exists?Boolean

[ GitHub ]

  
# File 'actionview/lib/action_view/view_paths.rb', line 13

delegate :template_exists?, :view_paths, :formats, :formats=,
         :locale, :locale=, :to => :lookup_context