[Catalyst] uri_for and Chained actions

Cédric Bouvier cbouvi at free.fr
Wed Oct 10 11:46:52 GMT 2007


Hello Catalysters,

I just started playing with Chained Actions, and so far I have a setup
like this:

    /myapp/*
    /myapp/*/update
    /myapp/*/update_do

'update' and 'update_do' being implemented in MyApp::C::Foo::update and
MyApp::C::Foo::update_do, respectively.

Now, in the <form> that gets displayed when calling
/myapp/foo/42/update, I'd like the "action" attribute to point to
/myapp/foo/42/update_do. Unfortunately, if I write:

    <form action=3D"[% Catalyst.uri_for('update_do') %]>

I end up with the URI to /myapp/foo/update_do. I could use
$c->req->uri and use it as a base for the relative URL 'update_do', but
please someone tell me that there is a better way?

-- =

C =E9 d r i c   B o u v i e r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071010/560a=
5f6e/attachment-0001.pgp


More information about the Catalyst mailing list