Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 3, 2013
1 parent 66221e2 commit 59f7038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -760,9 +760,8 @@ validate it with L<Mojolicious::Validator::Validation/"csrf_protect">.
return $self->render unless $validation->has_data;

# Check CSRF token
$validation->csrf_protect;
return $self->render(text => 'Bad CSRF token!', status => 403)
if $validation->has_error('csrf_token');
if $validation->csrf_protect->has_error('csrf_token');

my $city = $validation->required('city')->param('city');
$self->render(text => "Low orbit ion cannon pointed at $city!")
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -166,7 +166,7 @@ named buffers are shared with the L</"content"> helper.
%= csrf_token
Get CSRF token from session, and if none exists generate one.
Get CSRF token from L</"session">, and if none exists generate one.
=head2 current_route
Expand Down

0 comments on commit 59f7038

Please sign in to comment.