module ActionView::Rendering

Included modules:
ActionView::ViewPaths

Public Instance Methods

render_to_body(options = {}) Show source
# File actionview/lib/action_view/rendering.rb, line 81
def render_to_body(options = {})
  _process_options(options)
  _render_template(options)
end
rendered_format() Show source
# File actionview/lib/action_view/rendering.rb, line 86
def rendered_format
  format = lookup_context.rendered_format
  Template::Types[format] || format
end
view_context() Show source
# File actionview/lib/action_view/rendering.rb, line 71
def view_context
  view_context_class.new(view_renderer, view_assigns, self)
end

An instance of a view class. The default view class is ActionView::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.

view_context_class() Show source
# File actionview/lib/action_view/rendering.rb, line 58
def view_context_class
  @_view_context_class ||= self.class.view_context_class
end
view_renderer() Show source
# File actionview/lib/action_view/rendering.rb, line 77
def view_renderer
  @_view_renderer ||= ActionView::Renderer.new(lookup_context)
end

Returns an object that is able to render templates. :api: private

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.