[Catalyst] $c->res->redirect and $c->detach

Bogdan Lucaciu bogdan at wiz.ro
Tue Sep 19 00:59:00 CEST 2006


On Mon, 2006-09-18 at 15:44 -0700, John Napiorkowski wrote:
> > >
> > > Doing a $c->detach('/end') after the redirect was
> > > suggested to me, although I find this can give an
> > > error since my default end action looks for a
> > template
> > > which is this case doesn't exist.
> > >

Using the DefaultEnd plugin or the RenderView action class will handle
redirects for you.

Snip from thei source of Catalyst::Action::RenderView:
	return 1 if $c->response->status =~ /^(?:204|3\d\d)$/;

more info:
http://search.cpan.org/~mramberg/Catalyst-Action-RenderView-0.04/lib/Catalyst/Action/RenderView.pm

You still have to do the detach , of course.


-- 
Bogdan Lucaciu <bogdan at wiz.ro>




More information about the Catalyst mailing list