Renders the template which is given as a string as either erb or builder depending on template_extension. The hash in local_assigns is made available as local variables.
Source Code
# File action_view/base.rb, line 331 def render_template(template) #:nodoc: handler = template.handler @current_render_extension = template.extension if handler.compilable? compile_and_render_template(handler, template) else handler.render(template.source, template.locals) end end
<code/>and<pre/>for code samples.