Next | Pigs in Space | 32 |
Say that /path/to/ledger is a URL for the ledger object
The ledger can then make /path/to/ledger/consumer/:id a URL for a consumer object
sub _subroute { my ($self, $route) = @_; if ($route->[0] eq "consumer") { shift @$route; my $consumer_id = shift @$route; return $self->find_consumer( id => $consumer_id ); } else { return; } }
But Stick::Role::HasCollection writes this for you
Next | Copyright © 2013 M. J. Dominus |