Skip to content

Commit

Permalink
added example for render_maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 14, 2013
1 parent 382aab6 commit 35f7d77
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -685,8 +685,11 @@ automatic rendering would result in a response.
my $success = $c->render_maybe(controller => 'foo', action => 'bar');
my $success = $c->render_maybe('foo/index', format => 'html');
Try to render content, takes the same arguments as C<render> but does not call
C<render_not_found> if rendering fails.
Try to render content but do not call C<render_not_found> if no response could
be generated, takes the same arguments as C<render>.
# Render template "index_local" only if it exists
$self->render_maybe('index_local') or $self->render('index');
=head2 render_not_found
Expand Down

0 comments on commit 35f7d77

Please sign in to comment.