Merge branch 'master' of git://github.com/bobtfish/catalyst-action-rest
Arthur Axel 'fREW' Schmidt [Thu, 27 Aug 2009 00:47:21 +0000 (19:47 -0500)]
1  2 
lib/Catalyst/Action/REST.pm

@@@ -17,7 -17,8 +17,8 @@@ use Catalyst::Controller::REST
  
  BEGIN { require 5.008001; }
  
- our $VERSION = '0.74';
+ our $VERSION = '0.76';
+ $VERSION = eval $VERSION;
  
  sub new {
    my $class  = shift;
@@@ -94,10 -95,7 +95,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;