Navigation Menu

Skip to content

Commit

Permalink
added template rendering examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 3, 2014
1 parent 21cb31a commit 0526aab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -697,6 +697,12 @@ the L</"stash">.
# Render JSON
$c->render(json => {test => 'I ♥ Mojolicious!'});
# Render template "foo/bar.html.ep"
$c->render('foo/bar', format => 'html', handler => 'ep');
# Render template "foo/bar.*.*"
$c->render('foo/bar');
=head2 render_exception
$c = $c->render_exception('Oops!');
Expand Down

0 comments on commit 0526aab

Please sign in to comment.