[Catalyst] PathPart help

Matt S Trout dbix-class at trout.me.uk
Fri Nov 16 16:03:36 GMT 2007


On Thu, Nov 15, 2007 at 11:47:34AM -0800, Les Fletcher wrote:
> I have question about setting up PathPart's and Chaining.  I am trying 
> to set something that has the following look:
> 
> /namespace/ => This lists out a list of objects
> /namespace/<id> => displays detail information about the object with the 
> numeric id=<id>
> /namespace/<id>/edit => brings up a form to edit object with numeric id=<id>
> /namespace/create => brings up a form to create a new object
> 
> When the Chained actions are printed out everything looks fine, but when 
> I goto "/namespace/create" it matches the "/namespace/<id>" view 
> action.  Needless to say, there isn't an object with the numeric id of 
> "create."

Try upgrading to absolute latest Catalyst, I'm sure somebody patched this.

If that doesn't help, I'd suggest using

/namespace/id/<id>/edit

which is what I always use anyway, in case I need to change to string ids
later (slightly obsessive future-proofing but I've long since decided it's
not paranoia and the requirements changes -are- out to get me :).

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list