X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=2ee97168cd9bb23b0d95e2c9828d6dc303fe500e;hp=898ce60ca8f50bb5b364071c3f83b6c9b96500a5;hb=7656dd125be1895119fad6495083c29599deac44;hpb=5a173b14f2cd6d15a943d36e95f28a4b5280ac00 diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 898ce60..2ee9716 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -94,8 +94,9 @@ sub dispatch { my ($code, $name); # Common case, for foo_GET etc - if ( my $action = $controller->action_for($rest_method) ) { - return $c->forward( $action, $c->req->args ); + if ( $code = $controller->action_for($rest_method) ) { + $c->execute( $self->class, $self, @{ $c->req->args } ); + return $c->forward( $code, $c->req->args ); } elsif ($code = $controller->can($rest_method)) { # Exceute normal action $c->execute( $self->class, $self, @{ $c->req->args } );