Next | Pigs in Space | 34 |
'Stick::Role::HasCollection' => { item => 'consumer', collection_roles => [ 'Moonpig::Role::Collection::ConsumerExtras', 'Stick::Role::Collection::Mutable', ] },
The collection has a subrouter for:
/ledger/:id/consumers/count
/ledger/:id/consumers/all
/ledger/:id/consumers/guid/:guid
Stick::Role::Collection::Mutable adds the ability to post to:
/ledger/:id/consumers/add
Moonpig::Role::Collection::ConsumerExtras adds the ability to post to:
/ledger/:id/consumers/add_from_template
And the Consumer role itself adds
/ledger/:id/consumers/guid/:guid/adjust_replacement_chain
/ledger/:id/consumers/guid/:guid/quote_for_extended_service
/ledger/:id/consumers/guid/:guid/terminate
You can also compose Stick::Role::Collection::Pageable etc.
Next | Copyright © 2013 M. J. Dominus |