Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is what I have
- my $collection = $r->under('/rest/:table')->to('rest#collection');
- $collection->get('/')->to('rest#collection_get');
- $collection->options('/')->to('rest#collection_options');
- $collection->post('/')->to('rest#collection_put');
- my $item = $collection->under('/:row_id')->to('rest#item');
- $item->get('/')->to('rest#item_read');
- $item->delete('/')->to('rest#item_delete');
- # What I want is to now be able to do something like:
- $collection->after(sub {
- my $c = shift;
- return $c->render( json => $c->stash->{'something_added_above'} )
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement