Skip to content

Commit

Permalink
mention that proxy objects contain the current controller object
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 15, 2014
1 parent 5ffeb66 commit f3efbaa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -560,9 +560,9 @@ L</"session">.
my $helpers = $c->helpers;
Return proxy object on which helpers provided by L</"app"> can be called. This
includes all helpers from L<Mojolicious::Plugin::DefaultHelpers> and
L<Mojolicious::Plugin::TagHelpers>.
Return proxy object that contains the current controller object and on which
helpers provided by L</"app"> can be called. This includes all helpers from
L<Mojolicious::Plugin::DefaultHelpers> and L<Mojolicious::Plugin::TagHelpers>.
# Make sure to use the "title" helper and not the controller method
$c->helpers->title('Welcome!');
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -915,7 +915,8 @@ escaping.
Similar to stash values you can use a prefix like C<myapp.*> to keep helpers
from getting exposed in templates and to organize them into namespaces as your
application grows. Every prefix automatically becomes a helper that returns a
proxy object on which you can call the nested helpers.
proxy object containing the current controller object and on which you can
call the nested helpers.

use Mojolicious::Lite;

Expand Down
3 changes: 2 additions & 1 deletion lib/Mojolicious/Renderer.pm
Expand Up @@ -399,7 +399,8 @@ Get a C<DATA> section template by name, usually used by handlers.
Get a helper by full name, generate a helper dynamically for a prefix or
return C<undef> if no helper or prefix could be found. Generated helpers
return a proxy object on which nested helpers can be called.
return a proxy object that contains the current controller object and on which
nested helpers can be called.
=head2 render
Expand Down

0 comments on commit f3efbaa

Please sign in to comment.