123456789_123456789_123456789_123456789_123456789_

Module: ActionView::Rendering

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

ViewPaths - Attributes & Methods

Class Method Summary

Instance Attribute Summary

Instance Method Summary

ViewPaths - Included

#any_templates?,
#append_view_path

Append a path to the list of view paths for the current LookupContext.

#details_for_lookup,
#lookup_context

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

#prepend_view_path

Prepend a path to the list of view paths for the current LookupContext.

#template_exists?

Class Attribute Details

._view_paths (rw)

[ GitHub ]

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

class_attribute :_view_paths, default: ActionView::PathSet.new.freeze

._view_paths?Boolean (rw)

[ GitHub ]

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

class_attribute :_view_paths, default: ActionView::PathSet.new.freeze

Instance Attribute Details

#_view_paths (rw)

[ GitHub ]

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

class_attribute :_view_paths, default: ActionView::PathSet.new.freeze

#_view_paths?Boolean (rw)

[ GitHub ]

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

class_attribute :_view_paths, default: ActionView::PathSet.new.freeze

#view_context_class (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 60

def view_context_class
  @_view_context_class ||= self.class.view_context_class
end

#view_context_class=(value) (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 58

attr_internal_writer :view_context_class

Instance Method Details

#render_to_body(options = {})

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 82

def render_to_body(options = {})
  _process_options(options)
  _render_template(options)
end

#rendered_format

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 87

def rendered_format
  Template::Types[lookup_context.rendered_format]
end

#view_context

An instance of a view class. The default view class is Base.

The view class must have the following methods: View.new[lookup_context, assigns, controller]

Create a new ActionView instance for a controller and we can also pass the arguments.

View#render(option)

Returns String with the rendered template

Override this method in a module to change the default behavior.

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 73

def view_context
  view_context_class.new(view_renderer, view_assigns, self)
end