Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
Add TemplateView#partial() for rendering partial templates
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Dec 23, 2013
1 parent 93f7767 commit 6da369e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opal/vienna/template_view.rb
Expand Up @@ -25,6 +25,10 @@ def render
after_render
end

def partial(name)
Template[name].render(self)
end

def _render_template(template)
@output_buffer = OutputBuffer.new
instance_exec @output_buffer, &template.body
Expand Down

0 comments on commit 6da369e

Please sign in to comment.