Skip to content

Instantly share code, notes, and snippets.

@moltar
Created February 20, 2013 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moltar/5000407 to your computer and use it in GitHub Desktop.
Save moltar/5000407 to your computer and use it in GitHub Desktop.
routing
my $r = $self->routes;
push @{$r->namespaces}, 'Atlas::Backup::Web::Controller';
my $job = $r->route('/job')->to(controller => 'Backup::Job');
$job->get('')->to(action => 'collection');
for my $method (qw/get post put delete/) {
$job->$method('/:id')->to(action => "single_$method");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment