Skip to content

Commit

Permalink
simplified rearranging routes example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 12, 2012
1 parent c0566dd commit 2453eab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -678,8 +678,8 @@ or even removed. Especially for rearranging routes created by plugins this can
be very useful.

# GET /example/show -> {controller => 'example', action => 'show'}
$r->get('/show')->to('example#show')->name('show_example');
$r->any('/example')->add_child($r->find('show_example'));
my $show = $r->get('/show')->to('example#show');
$r->any('/example')->add_child($show);
$r->get('/secrets/show')->to('secrets#show')->name('show_secrets');
$r->find('show_secrets')->remove;

Expand Down

0 comments on commit 2453eab

Please sign in to comment.