Skip to content

Commit

Permalink
mention that conditions need to return a true value
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 13, 2014
1 parent 68fb6e9 commit 37dc0cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -817,7 +817,8 @@ To find routes by their name you can use L<Mojolicious::Routes::Route/"find">.

Sometimes you might need a little more power, for example to check the
C<User-Agent> header in multiple routes. This is where conditions come into
play, they are basically router plugins.
play, they are basically router plugins and need to return a true value for
the route to match.

# Simple "User-Agent" condition
$r->add_condition(
Expand Down

0 comments on commit 37dc0cc

Please sign in to comment.