Skip to content

Commit

Permalink
removed redundant format example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 31, 2014
1 parent 4ddf646 commit 58ef4a1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -429,13 +429,8 @@ automatically detected and stored in the stash value C<format>.
$r->route('/foo')->to(controller => 'foo', action => 'bar');

This for example allows multiple templates in different formats to share the
same code.

# /foo -> {controller => 'foo', action => 'bar'}
# /foo.html -> {controller => 'foo', action => 'bar', format => 'html'}
$r->route('/foo')->to(controller => 'foo', action => 'bar');

Restrictive placeholders can also be used.
same action code. Restrictive placeholders can also be used to limit the
allowed formats.

# /foo.rss -> {controller => 'foo', action => 'bar', format => 'rss'}
# /foo.xml -> {controller => 'foo', action => 'bar', format => 'xml'}
Expand Down

0 comments on commit 58ef4a1

Please sign in to comment.