Skip to content

Commit

Permalink
more render examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 11, 2012
1 parent f761bcc commit 8240fa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -740,12 +740,14 @@ C<url_for>.
my $success = $c->render;
my $success = $c->render(controller => 'foo', action => 'bar');
my $success = $c->render({controller => 'foo', action => 'bar'});
my $success = $c->render(text => 'Hello!');
my $success = $c->render(template => 'foo/index');
my $success = $c->render(template => 'index', format => 'html');
my $success = $c->render(data => $bytes);
my $success = $c->render(text => 'Hello!');
my $success = $c->render(json => {foo => 'bar'});
my $success = $c->render(handler => 'something');
my $success = $c->render('foo/bar');
my $output = $c->render('foo/bar', partial => 1);
my $success = $c->render('foo/index');
my $output = $c->render('foo/index', partial => 1);
This is a wrapper around L<Mojolicious::Renderer/"render"> exposing pretty
much all functionality provided by it. It will set a default template to use
Expand Down
1 change: 1 addition & 0 deletions lib/Mojolicious/Guides/Rendering.pod
@@ -1,3 +1,4 @@

=encoding utf8

=head1 NAME
Expand Down

0 comments on commit 8240fa3

Please sign in to comment.