after_create on_create_apply compat
groditi [Tue, 15 Dec 2009 21:05:20 +0000 (21:05 +0000)]
lib/Reaction/UI/Controller/Collection/CRUD.pm

index fc7585e..21faa4a 100644 (file)
@@ -45,6 +45,11 @@ sub on_delete_all_close_callback {
 
 sub on_create_apply_callback {
   my ($self, $c, $vp, $result) = @_;
+  if( $self->can('after_create_callback') ){
+    $c->log->debug("'after_create_callback' has been replaced with 'on_create_apply_callback' and is deprecated.");
+    shift @_;
+    return $self->after_create_callback(@_);
+  }
   return $self->redirect_to
     ( $c, 'update', [ @{$c->req->captures}, $result->id ] );
 }