From: t0m Date: Sun, 7 Jun 2009 22:36:00 +0000 (+0100) Subject: And mangle things such that the actual app test works X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;p=catagits%2FCatalystX-DynamicComponent.git And mangle things such that the actual app test works --- diff --git a/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm b/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm index 8856e97..a323cd4 100644 --- a/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm +++ b/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm @@ -79,8 +79,8 @@ sub generate_reflected_controller_action_method { sub { my ($self, $c, @args) = @_; $c->res->header('X-From-Model', $model); - my $response = $c->model($model)->$method_name($c->req->data); - $c->res->header('X-From-Model-Data', $response); + my $response = $c->model($model)->$method_name( { name => $args[0] }); + $c->res->header('X-From-Model-Data', $response->{body}); $c->res->body('OK'); $c->stash->{response} = $response; };