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:
self,
::ActiveSupport::Concern
|
|
|
Instance Chain:
self,
ViewPaths
|
|
| Defined in: | actionview/lib/action_view/rendering.rb |
ViewPaths - Attributes & Methods
Class Method Summary
::ActiveSupport::Concern - Extended
Instance Attribute Summary
ViewPaths - Included
Instance Method Summary
- #render_to_body(options = {})
- #rendered_format
-
#view_context
An instance of a view class.
ViewPaths - Included
| #any_templates?, | |
| #append_view_path | Append a path to the list of view paths for the current |
| #details_for_lookup, | |
| #lookup_context |
|
| #prepend_view_path | Prepend a path to the list of view paths for the current |
| #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( = {}) () _render_template() end
#rendered_format
[ GitHub ]#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.
# File 'actionview/lib/action_view/rendering.rb', line 73
def view_context view_context_class.new(view_renderer, view_assigns, self) end