allow redirect_to a url parameter
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Role / Actions.pm
index 32c7bbb..778115b 100644 (file)
@@ -67,7 +67,13 @@ sub _build_actions {
       location => join ('-', $loc, 'action', $i++),
       uri => ( ref($uri) eq 'CODE' ? $uri->($target, $ctx) : $uri ),
       display => ( ref($label) eq 'CODE' ? $label->($target, $ctx) : $label ),
-      layout => ( ref($layout) eq 'CODE' ? $layout->($target, $ctx) : $layout ),
+      layout => $layout,
+      exists $proto->{layout_args} ?
+        ( ref($proto->{layout_args}) eq 'CODE' ? 
+            $proto->{layout_args}->($target, $ctx) 
+            : 
+            $proto->{layout_args} ) 
+        : ()
     );
     push(@act, $action);
   }