Skip to content

Commit

Permalink
mention that the controller can be specified in CamelCase form
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 6, 2014
1 parent 54f9a49 commit 5bbde73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.25 2014-08-06
5.25 2014-08-07
- Added reduce method to Mojo::Collection. (sri, batman)
- Added if_none_match method to Mojo::Headers.
- Added is_fresh method to Mojolicious::Static.
Expand Down
6 changes: 6 additions & 0 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -305,6 +305,12 @@ C<controller> hierarchies.
# / -> MyApp::Controller::Foo::Bar->hi
$r->route('/')->to('foo-bar#hi');

You can also just specify the C<controller> in CamelCase form instead of
snake_case.

# / -> MyApp::Controller::Foo::Bar->hi
$r->route('/')->to('Foo::Bar#hi');

For security reasons the dispatcher will always check if the C<controller> is
actually a subclass of L<Mojolicious::Controller> or L<Mojo> before
dispatching to it.
Expand Down

0 comments on commit 5bbde73

Please sign in to comment.