Skip to content

Commit

Permalink
more diverse route examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 21, 2013
1 parent afe4a77 commit ad84e01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Routes.pm
Expand Up @@ -250,8 +250,8 @@ Mojolicious::Routes - Always find your destination with routes!
# More advanced routes
my $blog = $r->under('/blog');
$blog->post('/list')->to('blog#list');
$blog->get('/:id' => [id => qr/\d+/] => {id => 23})->to('blog#show');
$blog->options(sub { shift->render(text => 'Go away!') });
$blog->get('/:id' => [id => qr/\d+/])->to('blog#show', id => 23);
$blog->put(sub { shift->render(text => 'Go away!', status => 405) });
=head1 DESCRIPTION
Expand Down

0 comments on commit ad84e01

Please sign in to comment.