Catalyst::Action::Serialize::View uses the calculated $stash_key; amended C::C::REST...
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / View.pm
index 09ee45b..6379fa3 100644 (file)
@@ -9,9 +9,9 @@ sub execute {
     my ( $controller, $c, $view ) = @_;
 
     my $stash_key = (
-            $controller->config->{'serialize'} ?
-                $controller->config->{'serialize'}->{'stash_key'} :
-                $controller->config->{'stash_key'} 
+            $controller->{'serialize'} ?
+                $controller->{'serialize'}->{'stash_key'} :
+                $controller->{'stash_key'} 
         ) || 'rest';
 
     if ( !$c->view($view) ) {
@@ -19,7 +19,7 @@ sub execute {
         return 0;
     }
 
-    return $c->view($view)->process($c);
+    return $c->view($view)->process($c, $stash_key);
 }
 
 1;