[Catalyst] RFC: Catalyst::Controller::REST::DBIC

Ashley apv at sedition.com
Mon May 5 22:59:12 BST 2008


On May 5, 2008, at 2:36 PM, luke saunders wrote:
> I think that's fine.
>
>>  Now, I do vote against having an explicit create action, since "POST
>>  /foo" (or "POST /foo/{token}") seems to be a more reasonable create
>>  action.
>
> Agreed :-)


This doesn't strictly seem REST but I do a find_or_create on these,  
using
a non-pk, unlikely name field like "__new__", or even an illegal name  
like
"" (illegal at App level, not Model) so that I don't get a stack of  
unused
records. Then redirect a GET to the /foo/{created_or_found_token}

I'd shy away from any implementation where a user (or an agent) could
just pound away at a POST-point and fill up the DB with useless,
abandoned records.

-Ashley




More information about the Catalyst mailing list