Skip to content

Commit

Permalink
added to_route example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 7, 2013
1 parent 87cd5ce commit d5ae666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -449,7 +449,7 @@ requests indiscriminately.
$app->hook(before_dispatch => sub {
my $c = shift;
$c->render(text => 'Skipped dispatchers!')
if $c->req->url->path->contains('/do_not_dispatch');
if $c->req->url->path->to_route =~ /do_not_dispatch/;
});
These hooks are currently available and are emitted in the listed order:
Expand Down

0 comments on commit d5ae666

Please sign in to comment.