Skip to content

Commit

Permalink
show that the stash can be used for rendering as well
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 12, 2015
1 parent faf601a commit 770b1ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -666,6 +666,9 @@ the L</"stash">.
# Render characters
$c->render(text => 'I ♥ Mojolicious!');
# Render characters (alternative)
$c->stash(text => 'I ♥ Mojolicious!')->render;
# Render binary data
use Mojo::JSON 'encode_json';
$c->render(data => encode_json({test => 'I ♥ Mojolicious!'}));
Expand Down

0 comments on commit 770b1ea

Please sign in to comment.