Navigation Menu

Skip to content

Commit

Permalink
more diverse lite route examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 13, 2012
1 parent 2256132 commit 16cd327
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -528,11 +528,11 @@ From the tutorial you should already know L<Mojolicious::Lite> routes, which
are in fact just a small convenience layer around everything described above
and also part of the normal router.

# GET /foo -> {controller => 'foo', action => 'abc'}
$r->get('/foo')->to(controller => 'foo', action => 'abc');
# POST /foo -> {controller => 'foo', action => 'abc'}
$r->post('/foo')->to(controller => 'foo', action => 'abc');

# POST /bar -> {controller => 'foo', action => 'bar'}
$r->post('/bar')->to('foo#bar');
# PATCH /bar -> {controller => 'foo', action => 'bar', test => 23}
$r->patch('/bar')->to('foo#bar', test => 23);

# GET /baz -> {template => 'foo/bar'}
$r->get('/baz')->to(template => 'foo/bar');
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/templates/mojobar.html.ep
Expand Up @@ -77,7 +77,7 @@
$('html, body').animate({scrollTop:tweak}, 1);
}
var mojobar = $('#mojobar');
var start = mojobar.offset().top;
var start = mojobar.offset().top;
var fixed;
$(window).scroll(function () {
if (!fixed && (mojobar.offset().top - $(window).scrollTop() < 0)) {
Expand Down

0 comments on commit 16cd327

Please sign in to comment.