Created
February 20, 2013 22:46
-
-
Save moltar/5000407 to your computer and use it in GitHub Desktop.
routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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