X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FREST.pm;h=4a607b0baa10a35967116eae60def5e3f18fcb10;hb=5f749844ef9839e412a0c3e37ec7d3da007bc70a;hp=6a5ac82eb14a639ab2a33c069c7d510cbb1787da;hpb=7580fa2bd3b2410b86e5d0ef68d0b7f810911607;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 6a5ac82..4a607b0 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -94,7 +94,10 @@ sub dispatch { my ($code, $name); # Common case, for foo_GET etc - if ($code = $controller->can($rest_method)) { + 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 } ); $name = $rest_method;