public Method

Base.render_template(template)

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.