From 08c27c5b18df934a3f052d50a9e4ab361ddc4f3e Mon Sep 17 00:00:00 2001 From: purge Date: Fri, 2 Oct 2009 08:51:59 +0000 Subject: allow redirect_to a url parameter --- lib/Reaction/UI/Controller.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Reaction/UI/Controller.pm') diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm index 2d1b843..8222215 100644 --- a/lib/Reaction/UI/Controller.pm +++ b/lib/Reaction/UI/Controller.pm @@ -55,7 +55,7 @@ sub pop_viewports_to { } sub redirect_to { - my ($self, $c, $to, $cap, $args, $attrs) = @_; + my ($self, $c, $to, $cap, $args, $attrs, $domain) = @_; #the confess calls could be changed later to $c->log ? my $action; @@ -76,6 +76,7 @@ sub redirect_to { $args ||= $c->req->args; $attrs ||= {}; my $uri = $c->uri_for($action, $cap, @$args, $attrs); + $uri->host($domain) if $domain; $c->res->redirect($uri); } -- cgit v1.2.3-54-g00ecf