Class: ActionView::TemplateRenderer

Inherits:
AbstractRenderer show all
Defined in:
lib/action_view/renderer/template_renderer.rb

Overview

:nodoc:

Direct Known Subclasses

StreamingTemplateRenderer

Instance Method Summary collapse

Methods inherited from AbstractRenderer

#initialize

Constructor Details

This class inherits a constructor from ActionView::AbstractRenderer

Instance Method Details

#render(context, options) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
# File 'lib/action_view/renderer/template_renderer.rb', line 5

def render(context, options)
  @view    = context
  @details = extract_details(options)
  template = determine_template(options)

  prepend_formats(template.formats)

  @lookup_context.rendered_format ||= (template.formats.first || formats.first)

  render_template(template, options[:layout], options[:locals])
end