I'm an idiot
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / REST.pm
index 4404b1c..4a607b0 100644 (file)
@@ -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;
@@ -184,10 +187,6 @@ for this to run smoothly.
 
 =back
 
-=head1 MAINTAINER
-
-Hans Dieter Pearcey
-
 =head1 CONTRIBUTORS
 
 Christopher Laco
@@ -200,6 +199,8 @@ Daisuke Maki <daisuke@endeworks.jp>
 
 J. Shirley <jshirley@gmail.com>
 
+Hans Dieter Pearcey
+
 Tomas Doran (t0m) <bobtfish@bobtfish.net>
 
 =head1 AUTHOR